Note: any changes you make to the configuration files require an iisreset or IIS restart.
Method 1 – .NET Agent – The method to disable the agent depends on if you are using Framework or Core:
Please check a image below;


Method 2 - .NET Agent - To exclude an app from being monitored by the .NET Agent, add this to that apps’s web.config:
<appSettings>
<add key="NewRelic.AgentEnabled" value="false" />
</appSettings>
Method 3 - .NET Agent - You can exclude the app pool via the newrelic.config. Here is an example of disabling instrumentation for specific application pools:
<applicationPools>
<applicationPool name="Foo" instrument="false"/>
<applicationPool name="Bar" instrument="false"/>
</applicationPools>
Method 4 - .NET Agent - Here is an example of disabling instrumentation for all application pools currently executing on the server and enabling instrumentation for specific application pools:
<applicationPools>
<defaultBehavior instrument="false"/>
<applicationPool name="Foo" instrument="true"/>
<applicationPool name="Bar" instrument="true"/>
</applicationPools>
Method 5 - .NET Agent - You can disable the agent in the App specific newrelic.config file. You can have newrelic.config file at app level as well. Sometimes, we do not want to make changes in their web.config files; you can copy the global newrelic.file into the root directory of your app and make instrumentation changes there.
<configuration xmlns="urn:newrelic-config"
agentEnabled=“false"
maxStackTraceLines="50"
timingPrecision="high">














I’m a DevOps/SRE/DevSecOps/Cloud Expert passionate about sharing knowledge and experiences. I am working at Cotocus. I blog tech insights at DevOps School, travel stories at Holiday Landmark, stock market tips at Stocks Mantra, health and fitness guidance at My Medic Plus, product reviews at I reviewed , and SEO strategies at Wizbrand.
Please find my social handles as below;
Rajesh Kumar Personal Website
Rajesh Kumar at YOUTUBE
Rajesh Kumar at INSTAGRAM
Rajesh Kumar at X
Rajesh Kumar at FACEBOOK
Rajesh Kumar at LINKEDIN
Rajesh Kumar at PINTEREST
Rajesh Kumar at QUORA
Rajesh Kumar at WIZBRAND