Azure App Services

If your .NET application runs on Microsoft's Azure and you are managing it with Microsoft’s App Services in the new Azure Portal, follow this procedure to install and use New Relic's .NET agent. The new Azure Portal enables you to quickly and easily install the New Relic .NET agent through the Azure Portal user interface.

If you are managing your .NET application with Microsoft's Azure Classic Portal, follow New Relic's Classic Portal installation procedure.

App Services installation for Azure Web Apps

You can use these installation methods with any New Relic account type:

Manual installation via NuGet

If you are familiar with New Relic, Azure, and NuGet, this summarizes how to add New Relic to your Azure-deployed web app. For multi-project solutions, make sure you have selected the correct project (for example, a specific web app project) before installing the NuGet package.

To manually install the .NET agent for Azure Web Apps:

  1. Verify your Azure Platform (32Bit or 64bit): From the Azure side bar menu, select App Services > Your Application > Settings > Application Settings.
  2. Open your application in Visual Studio, and install the New Relic NuGet package by running the appropriate command from the Package manager console:
    • 32-bit: Install-Package NewRelic.Azure.WebSites
    • 64-bit: Install-Package NewRelic.Azure.WebSites.x64
  3. Publish your application.
  4. Add App settings to your Azure Web App.
  5. If you use Azure's Standard or Basic tiers: Ensure that the Always On setting is disabled. In the Azure portal, select (your app) > Settings > Application Settings and set the Always On toggle to Off.
  6. Restart your web app.

If you are upgrading the agent via NuGet, any changes you made in the newrelic.config will be overwritten. If you wish to preserve any changes, make sure to save your newrelic.config outside of your project and restore it after upgrading.

Extension installation via the SCM website

To manually install the .NET agent for Azure Web Apps using the New Relic Site Extension:

  1. Create an Azure-specific New Relic account or use your existing New Relic account.
  2. Add App settings to your Azure Web App.
  3. Add the site extension as described below.

To add the site extension:

  1. Navigate to http://[yoursitename].scm.azurewebsites.net.
  2. From the top navigation, select site extensions.
  3. Select the Gallery.
  4. Next to the New Relic site extension, select the plus plus icon.
  5. If you use Azure's Standard or Basic tiers: Ensure that the Always On setting is disabled. In the Azure portal, select (your app) > Settings > Application Settings and set the Always On toggle to Off.
  6. Restart your Web App.
Extension installation via the Azure Portal

To manually install the .NET agent for Azure Web Apps using the New Relic Site Extension:

  1. Create an Azure-specific New Relic account, or use your existing New Relic account.
  2. Add App settings to your Azure Web App.
  3. Add the site extension as described below.

To add the site extension:

  1. Navigate to your Web app.
  2. Select Tools > Extensions.
  3. In the command section of the blade, select the plus plus icon.
  4. Select the New Relic extension.
  5. Accept the legal terms, and select OK.
  6. If you use Azure's Standard or Basic tiers: Ensure that the Always On setting is disabled. In the Azure portal, select (your app) > Settings > Application Settings and set the Always On toggle to Off.
  7. Restart your Web App.

New Relic settings for your Azure Web App

Make sure you have your license key before adding the New Relic .NET agent's app settings.

To add your app settings:

  1. Open your Web App that you want to monitor, and then select Settings > Application Settings.
  2. From App settings, add these key/value pairs:

    Key Value
    COR_ENABLE_PROFILING 1
    COR_PROFILER {71DA0A04-7777-4EC6-9643-7D28B46A8A41}
    COR_PROFILER_PATH D:\Home\site\wwwroot\newrelic\NewRelic.Profiler.dll
    NEWRELIC_HOME D:\Home\site\wwwroot\newrelic
    NEW_RELIC_LICENSE_KEY YOUR_LICENSE_KEY
  3. Select Save.
  4. Restart your Web App.

Check your app's performance

To check your app's performance: From the top of the New Relic account blade, select the Visit New Relic link.

You will be automatically logged in with SSO to New Relic APM. Use any of New Relic's standard user interface functions and page functions to drill down into detailed information.

You can also view your application's error rate and throughput data in the Azure Portal by going to New Relic Accounts > choose your application.

For more help

Additional documentation resources include:

Join the discussion about .NET monitoring in the New Relic Online Technical Community! The Technical Community is a public platform to discuss and troubleshoot your New Relic toolset.

If you need additional help, get support at support.newrelic.com.