This page applies to an earlier version of the AppDynamics App IQ Platform.
For documentation on the latest version, see the 4.4 Documentation.
The .NET Agent uses a single configuration file to control agent behavior and .NET Machine Agent behavior. The configuration file specifies Controller connectivity, .NET Machine Agent operations, and app agent functionality for IIS applications, Windows services, and standalone applications. The single configuration file let's you:
- Maintain agent configurations separately from web.config files.
- Enable instrumentation of Windows services and standalone applications without environment variables.
- Control agent behavior for specific applications with hierarchical configuration.
Where to Configure Agent Properties
Configure the agent properties in the config.xml file in the agent Config directory. To edit the config.xml, you must launch the editor as an administrator. When you run the .NET Agent Configuration Utility, it writes the conifg.xml to one of the following locations:
Windows Server 2008 and later
%ProgramData%\AppDynamics\DotNetAgent\Config\config.xml
Windows Server 2003
%AllUsersProfile%\Application Data\AppDynamics\DotNetAgent\Config\config.xml
Windows Azure
For Windows Azure deployments, the .NET Agent NuGet pacakage contains the config.xml file. See Install AppDynamics for Windows Azure with NuGet.
Sample config.xml files install to the following location:
%ProgramFiles%\AppDynamics\AppDynamics .NET Agent\SampleConfigurations
After you edit the config.xml, you must restart the AppDynamics.Agent.Coordinator service. Then restart IIS, your Windows service, or standalone application for your instrumentation changes to take effect.
Customize .NET Agent Behavior in config.xml
Some .NET Agent configurations require that you edit the config.xml:
- Shut down the AppDynamics.Agent.Coordinator service.
Edit the config.xml file as an administrator.
Modify the xml according to the configuration instructions.
Save the config.xml.
- Start the AppDynamics.Agent.Coordinator service.
- In some cases you may need to restart IIS, instrumented Windows services, or instrumented Standalone applications. See individual .NET Agent administration topics.
Sample Minimal config.xml
The most basic configuration demonstrates the required sections for agent configuration. This sample instruments all IIS applications using the automatic element (<automatic />
). No Windows services or standalone applications are instrumented.
<?xml version="1.0" encoding="utf-8"?> <appdynamics-agent xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <controller host="mycontroller.mycompany.com" port="8090" ssl=false"> <application name="MyDotNetApplication" /> </controller> <machine-agent /> <app-agents> <IIS> <automatic /> </IIS> </app-agents> </appdynamics-agent>
Agent Log Files
The configuration file that controls log files for the .NET Agent is located at:
%ProgramFiles%\AppDynamics\AppDynamics .NET Agent\AppDynamicsAgentLog.config
The configuration file uses NLog configuration format.