.NET Core Instrumentation

.NET Core Agent

Installation

Please see our .NET Core - Supported Technologies page for additional information on our application stacks supported by our .NET Core agent.

Configuration

  • Configure the config file in the following location: C:\ProgramData\Contrast\dotnet\contrast_security.yaml

Running the .NET Core agent

  • Run using a launch profile by adding a “Contrast” launch profile to your application’s launchSettings.json file
    dotnet run --launch-profile Contrast
    
  • Run using IIS and IIS Express
    • Add environment variables to your web.config file
  • For testing, the environmental variables can be set using a PowerShell (.ps1) script
    $env:variable = “value”
    dotnet test