Install the .NET Framework agent using a container

Before you begin

This topic provides general guidance for installing the Contrast .NET Framework agent in a containerized application, with Docker as an example.

You should have a basic understanding of how containers and related software work. You may need to adjust the instructions to meet your specific circumstances.

Install the agent

If you are using containerized applications, you can install the Contrast .NET Framework agent using the NuGet package.

  1. Use a Docker image based on Microsoft ASP.NET.

  2. Download Contrast agent assemblies from the Contrast.NET.Azure.AppService NuGet package.

  3. Extract the NuGet package.

  4. Set the following environment variables on the application process. Replace <YourPath> with the path to the extracted files.

    Environment variable










  5. Use YAML configuration or environment variables to configure authentication with Contrast and other settings for the .NET Framework agent.


You can see examples of finished code in this GitHub repository. In particular, these ASP.NET application use cases might be helpful.

Default AppPool:

Custom AppPool:

See also

Contrast Support Portal Kubernetes and Contrast

Contrast Support Portal AWS Fargate and Contrast agents