Our application (hosted in IIS) uses the newrelic browser monitoring for all pages. However we have a new request that for certain pages (.net MVC views) and conditions third party cookies are not allowed (like JSESSIONID). Also the automatically injected newrelic script is not allowed.
Normally NewRelic.Api.Agent.NewRelic.DisableBrowserMonitoring(); should work but it seems that our current architecture has side effects.
All requests to those specific pages are actually rewritten (with IIS Url Rewrite Module) from our main app to another app (that is hosted on separate servers and has it’s own internal domain that is not visible to the user). I added NewRelic.Api.Agent.NewRelic.DisableBrowserMonitoring() in the specific views. If I access the views via the internal domain (directly from the web server) the newrelic script is not injected but if I access the page via normal flow starting from main app the newrelic script is automatically injected.
The browser monitoring is setup for the main domain name.
Any ideas how to fix this?
Thank you in advance,