Your data. Anywhere you go.

New Relic for iOS or Android

Download on the App Store    Android App on Google play

New Relic Insights App for iOS

Download on the App Store

Learn more

Close icon

.net and dotnet core agent on same machine




We have a restful API that is implemented with dotnet core and using IIS as a reverse proxy. On the production server both .net and dotnet core New Relic agent are installed. We are having an issue that the our restful application is being track in both agents. We only want it track in the dotnet core. How can we disabled .net agent for this application only.



The agents will only attach to either the .NET 4.0 CLR or the .NET Core CLR, not both, so it is odd that you are seeing an app reporting from both.

Could you share what framework your app targets in your .csproj file? It will look something like this:


Also, are you seeing a newrelic_agent_myappname.log in both agent log locations?


In case this helps anyone else running into a similar issue, we moved this to a support ticket and found the issue was caused by the app pool for the .NET Core application was set to use the 4.0 CLR instead of “No Managed Code” recommended by Microsoft.

Because the app pool is set to .NET CLR Version 4.0 the framework CLR is being invoked for each request as IIS passes it off to the .NET Core process. This is what is being recorded as a transaction in the framework agent. I would recommend setting the app pool to use No Managed Code per the Microsoft documentation:

Note that if you have any .NET framework applications using this same app pool they will stop working if you set it to No Managed Code. In that case I’d recommend creating a new .NET Core only app pool.