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.
Use a Docker image based on Microsoft ASP.NET.
Download Contrast agent assemblies from the Contrast.NET.Azure.AppService NuGet package.
Extract the NuGet package.
Set the following environment variables on the application process. Replace
<YourPath>
with the path to the extracted files.Environment variable
Value
COR_ENABLE_PROFILING
1
COR_PROFILER
{EFEB8EE0-6D39-4347-A5FE-4D0C88BC5BC1}
COR_PROFILER_PATH_32
<YourPath>\content\contrast\ContrastProfiler-32.dll
COR_PROFILER_PATH_64
<YourPath>\content\contrast\ContrastProfiler-64.dll
Use the YAML configuration or environment variables to configure authentication with Contrast and other settings for the .NET Framework agent.
Tip
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