Use application pools in IIS

The .NET agent automatically instruments all ASP.NET applications deployed to IIS. If you install the .NET agent and ensure the background Windows service runs for the agent, Contrast will instrument all IIS-hosted applications.

You might want to exclude some applications from instrumentation because:

  • You don't need to gather security, architecture and library information for these applications.

  • The applications are on resource-constrained servers or need to avoid additional performance demands for Contrast instrumentation.

Web applications hosted in IIS run in application pools. If you need to disable the .NET agent for an application, you can denylist the application pool where it runs.

There are three ways to find the application pool that runs a specific application:

  • Internet Information Services (IIS) Manager

    Start IIS Manager with the command: %windir%\system32\inetsrv\InetMgr.exe. Select the web application you want, and select Basic Settings. You will see a field that displays the application pool name.

  • AppCmd.exe

    If you Administrator privileges, run cmd.exe. Navigate to C:\Windows\System32\inetsrv. Enter appcmd list apps to see a list of applications and the application pools for each.

  • Contrast .NET logs

    Start the Contrast .NET agent. Browse to an application. In Windows, navigate toC:\ProgramData\Contrast\dotnet\LOGS. Open the most recent Profiler log (XXXXX_Profiler_[AppDomain]XXXXX[XX].log). The application pool name is on the line that starts with ApplicationPool Name.