Deprecated .NET Framework Agent configuration options

  • Updated

Note: These configuration values are considered legacy configuration options (not to be confused with the Legacy .NET Framework Agent). As of version 19.5.4 these configuration options began deprecating. New configuration values will only be supported via YAML-based configuration. All users are encouraged to migrate to YAML configuration properties.

 

The Contrast configuration file DotnetAgentService.exe.config contains several settings that you can modify to change the behavior of the .NET agent for Windows. In all cases, configuration values in the agent configuration file will override any configuration values that have the same name specified in the Contrast UI (e.g., logging level, sampling and stack trace configuration).

 

General

Parameter Description Version
AutoUpdateBehavior Determines if the agent automatically updates to a newer version when a newer version is available on Contrast. The default value is Daily.
  • Daily: The agent checks for a new version on service start and every 24 hours afterwards.
  • Startup: The agent only checks for and installs updates on service start
  • Disabled: The agent checks for, but doesn't install, any updates.
4.6+

 

Communication

Parameter Description Version
TeamServerUrl Overrides the Contrast URL that's packaged with the agent. This can be useful for networks that proxy the information. All
ProxyAuth, ProxyAddress Controls the proxy used by the agent (if any) to connect to the Contrast interface. Proxy credentials (if applicable) are stored in a separate DotnetAgent.Protected section as described below. All
TlsVersion Controls the version of TLS that the agent uses to communicate with the Contrast interface. Valid TlsVersion values include TlsTls11 and Tls12. Agent default behavior is SecurityProtocolType.Tls | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12. 3.3.6+

 

Display Customization and Tagging

Parameter Description Version
ServerName Customizes the display name used by the Contrast interface for the server running the .NET agent. If the ServerName configuration setting is not present, the .NET agent will use the computer name for the server's display name. You can view the computer name by viewing the System properties in the Windows Control Panel. 3.1.4+
ServerEnvironment Controls the environment value sent to Contrast when servers are created. Valid ServerEnvironment values are DEVELOPMENTQA or PRODUCTION (case insensitive). The default value is QA. This does not affect servers that already exist in Contrast. 3.4.2+

 

Diagnostics

More detailed levels of logging degrade performance, but can generate useful information for debugging Contrast. The logging level is configured in Server Settings in the Contrast interface by default; however, you can also configure it at the agent level.

LogLevel Controls
Error Only log error conditions, such as unhandled exceptions
Warn Error messages and unexpected conditions that don't impact the agent
Info Error and Warn messages as well as general information about the agent's sensors (startup, shutdown, start and end of requests, etc.)
Debug Info messages and some high-level debugging information (e.g., number of vulnerabilities detected for a request)
Trace Debug messages as well as logging every trace event (e.g., String.Concat); this logging level greatly degrades performance

 

Performance

Parameter Description
StackTraceConfig Limits stack traces captured by the agent. Configured in Server Settings in the Contrast interface by default. The default is Full.
  • Full: Captures all stack traces with file and line number information. Deployments must include .PDB files for line number information.
  • Limited: Better performance; captures all stack traces but without file and line number information. Best used for builds without debugging symbols (.PDBfiles).
  • Minimal: Best performance; doesn't capture intermediate propagator stack traces, no file and line information. Best used for Release builds and Production environments.

Was this article helpful?

0 out of 0 found this helpful

Have more questions? Submit a request