Relic Solution: Check/Configure the License Key Settings For the .NET Agent

The license key for your .NET agent can be set in one of three ways. Choose the one that works best for you.

In order of precedence (each setting will supersede the settings below it), license keys can be set:

  • With the NEW_RELIC_LICENSE_KEY environment variable - This can be used to set the license key system-wide, or for an individual application process. If the application’s process contains this environment variable, the .NET agent will use it for that application.

  • In a localized newrelic.config file. If you place a copy of the newrelic.config file in the root folder of your application, the .NET agent will load that config file for your application instead of the global config file.

  • In the global newrelic.config file - If neither of the other two settings exist for your application process, the .NET agent will fall back to the settings in the global newrelic.config file that shipped with the agent. For .NET Framework agents, the default location of this file is C:\ProgramData\New Relic\.NET Agent. For .NET Core agents or agents installed with Nuget, the file will be in the directory where the agent was extracted on your system.

1 Like