NET (Agent, Installation)

Showing results for 
Search instead for 
Did you mean: 

How to deploy the .NET Core Agent on a Windows Host post App Deployment

AppDynamics Team

How to deploy the .NET Core Agent on a Windows Host post App Deployment

There are occasions where a customer will push a .NET Core application to a windows host without using nuget, or any of the microservice push capabilities out of VisualStudio. I find this most commonly where the development team is pushing their apps to a repository but the devops team then needs to load the agent during actual deployment.


The steps below outline how to instrument an already deployed application. These steps can be followed and implemented for devops operations.


NOTE: This will take up a full non-microservice APM license.


Step-by-step guide


STEP 1: Download the .NET Core agent for Windows

  1. Open a web browser
  2. Navigate to:
  3. Search for “AppDynamics”
  4. Determine which package to download here:

If the host is a single Windows VM not running in Azure or is a single Windows host, agnostic to the cloud environment (i.e. customer administers the OS), then download “AppDynamics.Agent.Distrib.Micro.Windows"


STEP 2: Install the AppDynamics Agent DLLs

  1. Create a directory (preferably at root C: level) for where the AppDynamics Agent DLL files will reside. Example: C:\AppDynamics\dotNETcoreAgent\
  2. Permit read, write and execute to the users of the .NET Core application




    IIS: If the application is an ASP.NET Core application running in IIS, then make sure that “IIS_IUSRS” has full access.


  3. Extract the downloaded "AppDynamics.Agent.Distrib.Micro.Windows" nuget package into a temporary directory.
  4. Navigate into the "tools" subdirectory of the extracted nuget package.
  5. Copy the following files into the newly created directory from STEP 2.1


STEP 3: Setup Environment Variables for the .NET Core CLR Profiler



Environment variables are described in detail here:


  1. Open Windows Explorer
  2. Right click “This PC”
  3. Click “Properties”
  4. Click “Advanced System Settings”
  5. Click “Advanced” Tab
  6. Click “Environment Variables…”



  7. Click “New…” under “System variables” and add each of the following.


    NOTE: <appd_agent_path> is the path created in STEP 2.1 above






  8. Click “OK” out of each dialog and close all windows.

STEP 4: Configure the AppDynamics Agent

    1. Copy the “AppDynamicsConfig.json” file to the Application’s directory (where the .NET Core DLL files reside).
    2. Rename “AppDynamicsConfig.json” to “<APP>.AppDynamicsConfig.json”


      If unsure the name of the application ask the developers or those who deploy and start the application.


      For IIS ASP.NET Core applications, the name of the applications can be found in “web.config” within the application’s directory.


    3. Edit the “<APP>.AppDynamicsConfig.json” file and configure as described here:


      1. At minimum, need “Controller” and “Application” fields sets (reference docs).
      2. When there are multiple .NET Core "Service/app" deployed on 1 host
        • The "tier" and "node" should be different for each "service/app" even though they reside on the same host.
      3. The application "name" will be the same for all "services/apps" that should be grouped together to logically complete/represent an application.


    4. Save and close the file.

STEP 5: Restart the application



If application is an IIS ASP.NET Core application, then a full IIS restart is required. This can be done by opening a command prompt and executing: iisreset



Tags (3)
How to deploy the .NET Core Agent on a Windows Host post App Deployment