This page applies to an earlier version of the AppDynamics App IQ Platform.
See the latest version of the documentation.

Skip to end of metadata
Go to start of metadata

On this page:

Related pages:

You can use Microsoft VisualStudio to add the .NET Agent directly to projects you plan to deploy to Windows Azure. The AppDynamics for Windows Azure NuGet Package works for the following types of projects:

  • Azure Cloud Services: Web Roles and Worker Roles
  • Azure App Services (formerly Azure Websites)
    • Web Apps, Web Jobs, and API Apps

If you are upgrading to a new version of the AppDynamics for Windows Azure NuGet Package, see Upgrade AppDynamics for Windows Azure.

Prepare to Install the NuGet Package

To install the AppDynamics for Windows Azure NuGet package you need the following:

  • Connection information for your AppDynamics Controller version 4.3
  • Visual Studio 2010 or later
  • A Visual Studio solution to monitor
    The user account running Visual Studio must have the following permissions to the solution:
    • Read and Write permissions to each project directory
    • Read and Write permissions to each Visual Studio .NET C# Project (*.csproj) file
    • Read and Write permissions to the Service Definition (ServiceDefinition.csdef) file
  • Windows Azure SDK
  • Windows Azure account

If you have installed the Visual Studio Standalone Profiler, you must uninstall it and remove related registry entries.

These instructions assume you are familiar with NuGet package management in Visual Studio and with the Microsoft Azure Portal. You can also try the step-through tutorial on how to instrument an App Service on the community knowledgebase.

Add the .NET Agent to Your Azure Solution

Use the NuGet package manager to browse the nuget.org package source and install the AppDynamics.WindowsAzure v.4.3.x package to your Azure solution in Visual Studio.

For detail about managing NuGet packages, see the documentation for your version of Visual Studio.

The AppDynamics.WindowsAzure package installation prompts you as follows:

  • The installer may ask you to verify your changes. If so, click OK.
  • Click I accept to agree to the terms of the license.

Enter connection information for your AppDynamics Controller on the AppDynamics for Windows Azure window:

  • Details about Controller connection settings. For more information, see Agent-to-Controller Connections
  • Check Test Connection to validate your Controller connection information. When you click Apply the package installer tests the connection and only saves valid configuration settings.
  • Optionally change the Application Name. AppDynamics automatically populates Application Name with the name of your Windows Azure solution. 
  • If you are installing the package for an Azure App Service (or Website), check Azure Web App.

When you click Apply to save your settings, the package manager installs the .NET Agent into your project:

  • The configuration file installs to <project_root>/App_Data/AppDynamics/Config/config.xml.
  • The agent binaries and supporting files install to <project_root>/AppDynamics.

By default the .NET Agent names Azure tiers as follows:

  • role name for Cloud Services
  • site name for App Services

If you want to customize the tier name, edit the config.xml under  <project_root>/App_Data/AppDynamics/Config. For more information and examples, see "Name IIS Tiers Manually" on Name .NET Tiers.

After you finish any configuration changes, publish your solution to Windows Azure.

  • For Cloud Services solutions, you can put load on your published project and log on to the AppDynamics Controller and begin monitoring your solution.
  • For App Services, the following instructions describe how to configure the .NET Agent for Azure App Services.

Configure the .NET Agent for Azure App Services

To complete the configuration for the .NET Agent with App Services, you must configure environment variables for the App Service. There are two methods for setting the environment variables.

If your project has App Service Authentication enabled, you must deploy using environmental variables. You can check the AppService Authentication setting under Authentication/Authorization for your App Service in the Windows Azure Portal.

Deploy with NuGet using applicationHost.xdt

  1. Login to https://portal.azure.com and open your App Service.
  2. Under DEVELOPMENT TOOLS, click Console to launch a command prompt for your App Service.
    The console opens to the IIS wwwroot directory.
  3. Run the following command to copy the applicationhost.xdt configuration file to the parent directory:

    copy applicationHost.xdt ..
  4. Restart the App Service.

  5. Put some load on your App Service and you're ready to log on to the AppDynamics Controller and begin monitoring your solution.

Deploy with NuGet using Environment Variables

  1. In Visual Studio, open the ApplicationHost.xdt file to view the environment variables to set in the Azure Portal.
  2. Login to https://portal.azure.com and open your App Service.
  3. Navigate to SETTINGS > Application Settings.

  4. Below App Settings, create a key value pair for each environment variable in the ApplicationHost.xdt file.

    Use the absolute path for your App Service home directory in the for the COR_PROFILER_PATH_32COR_PROFILER_PATH_64, and DotNetAgentFolder variables. For example:

    COR_PROFILER = {AEB86E5F-8AF7-4A74-B338-3BC6586E6E12}
    COR_PROFILER_PATH_32 = D:\home\site\wwwroot\AppDynamics\x86\AppDynamics.Profiler_x86.dll
    COR_PROFILER_PATH_64 = D:\home\site\wwwroot\AppDynamics\amd64\AppDynamics.Profiler_x64.dll
    DotNetAgentFolder = D:\home\site\wwwroot\App_Data\AppDynamics

    Do not use another environment variable such as %home% as part of the environment variable values.

  5. Restart the App Service.

  6. Put some load on your App Service and you're ready to log on to the AppDynamics Controller and begin monitoring your solution.

Update .NET Agent Configuration for Cloud Services

If you have already published your solution, you can update the .NET Agent configuration for the currently installed version without upgrading the agent.

  1. Edit the config.xml file to make configuration changes.
  2. Edit the startup.cmd file under <solution_rooot>/AppDynamics.
  3. Set the CONFIGUPDATE variable to "true".

  4. Publish the Windows Azure cloud solution

Upgrade AppDynamics for Windows Azure

You can use the NuGet package manager to upgrade AppDynamics for Windows Azure. Browse to the AppDynamics.Windows.Azure package under installed packages. The right hand pane lets you choose a new version of the AppDynamics for Windows Azure NuGet package. After you update AppDynamics for Windows Azure, publish your solution.