1
Vote

CORS error were reported

description

From Azure Portal, I can see there are failures reported as "The browser’s same-origin policy prevents us from getting the details of this exception.The exception occurred in a script loaded from an origin different than the web page.For cross- domain error reporting you can use crossorigin attribute together with appropriate CORS HTTP headers.For more information please see http://www.w3.org/TR/cors/.".

I looked at the source code and it seems that Azure.ApplicationInsights.TrackingScript.cshtml is referring to "//az416426.vo.msecnd.net/scripts/a/ai.0.js", which is hosted on a 3rd-party domain.

If this turns out to be the cause of the above CORS error, is there any chance that this file can be included in the module, or the path to the script can be configured in Orchard?

comments

Piedone wrote Sep 16, 2015 at 11:03 AM

Hmm. Yes that script is referenced but it's loaded as part of a script tag (as an external JS) like any analytics or tracking script, so that alone shouldn't be the issue. And what's in Azure.ApplicationInsights.TrackingScript.cshtml is exactly what's in the AI docs so I'm confused. Are you sure this script is causing the issue? Because I think the fact that you see the error in the Azure Portal shows that the AI script is working as expected.