Install the .NET agent
New Relic supports the most popular .NET application implementations. Once installed, our .NET APM agent monitors your app's performance and gives you insight into that performance. Want more context? See Introduction to APM.
![Example .NET APM dashboards A screenshot of example .NET APM dashboards](/images/apm_screenshot-crop_overview-of-the-dotnet-agent.webp)
Installation options
The New Relic .NET agent has installation options for Linux, Windows, AWS elastic beanstalk, WCF, Nuget, and Azure cloud, web, and service fabric. Select your installation path using the form below for installation instructions based on your environment!
Tell us about your .NET app
How would you like to enable the .NET agent?
Disable Application Insights
Both New Relic's .NET agent and Microsoft Application Insights rely on the CLR Profiler, but only one may be active at a time. You must disable Application Insights in order for the .NET agent to function properly. For more information, see our Application Insights troubleshooting procedures.
Install using Azure site extension
To install the .NET agent for an Azure Web App using the New Relic Azure Site Extension:
- Shut down your web application before installing the New Relic Azure Site Extension.
- Add the site extension: Navigate to
https://[yoursitename].scm.azurewebsites.net
, then select Site extensions > Gallery. - Select the plus icon next to the New Relic site extension.
- In the Azure portal, add New Relic app settings to your Azure App Service. This installs the latest .NET agent version.
- Restart your web app.
Tip
If you've already installed the site extension and set the version override but your application is not reporting, you may need to remove and re-install the site extension for the environment variable to be recognized and for the correct version to be installed.
A couple notes related to this install process:
- If you need to add a custom instrumentation XML, or modify the base
newrelic.config
file, you'll find the .NET agent for .NET Framework at%HOME%\NewRelicAgent\Framework
, and the agent for .NET Core at%HOME%\NewRelicAgent\Core
. - This install method monitors all .NET Core applications on the Azure Web Apps instance. If you'd like to disable monitoring for specific .NET Core applications, you can do either of these:
- Disable the agent in an
appsettings.json
file. - In a
newrelic.config
file located in the app's root directory, setagentEnabled
tofalse
.
- Disable the agent in an
Add New Relic app settings to Azure App Services
To add your app settings:
Make sure you have your before adding the New Relic .NET agent's app settings.
In the Azure portal, search for and open App Services to go to the web app you want to monitor. Next, select Configuration > Application settings
From Application settings, select setting and add these key/value pairs:
Key
Value
NEW_RELIC_LICENSE_KEY
YOUR_LICENSE_KEY
NEW_RELIC_APP_NAME
YOUR_APP_NAME
If you need to use a previous .NET agent version, use this key/value pair:
Key
Value
NEWRELIC_AGENT_VERSION_OVERRIDE
DESIRED_AGENT_VERSION_NUMBER
Save and restart your web app.
Setting the and app name with Application settings will override the newrelic.config
.
To verify your app's environment variables in your app's Kudu diagnostic console, go to Environment > Environment variables.
For example:
https://myappname.scm.azurewebsites.net/Env.cshtml#envVariables
View your app's performance
Your application must receive traffic in order for you to view its performance in New Relic. You may need to wait a few minutes for data to start appearing. If no data appears, see the troubleshooting procedures for Azure Web Apps. To view your app's performance in New Relic: Go to one.newrelic.com > All capabilities > APM & services > (select an app). The APM Summary page automatically appears.
If no data appears after installing the agent, generating traffic for your app, and waiting a few minutes, try these troubleshooting tips:
- Make sure that all files in the
newrelic
directory at the root of your app got published to Azure. - Make sure the environment variables are set correctly.
- Make sure Microsoft Application Insights is not installed and configured on the application. For more information, see the Application Insights troubleshooting procedures.
- Refer to additional Azure troubleshooting procedures as applicable.
Did this doc help with your installation?
What's next?
Look for your app data in the UI
Look for your app data on the APM Summary page (it can take a few minutes).
Read the APM docs
For example, read about the Summary page, the Errors page, and the Transactions page.