Reputation: 55
I have enabled cors on my server and i'm using this website to test if cors was enabled successfully on my server.
When i use chrome the call to http://myserver/iisstart.htm
it succeeds but when i use IE i get an exception SCRIPT 5: Access is Denied on the line xhr.open(method, url, true);
The error is happening on the open method so it is not about the server configuration.
if i call http://myserver.com/iisstart.htm
i don't have this error anymore, but of course the call won't work because i'm not on .com
So why IE doesn't allow opening the XMLHttpRequest when the url refers to a local address?
Upvotes: 1
Views: 3226
Reputation: 670
Sites on your local network are run with Enhanced Protection Mode enabled by default. This prevents your local network from accessing potentially unsafe pages from another zone (i.e. the Internet zone).
You have a couple options to solve this: 1) Ensure you're only making requests to local resources. 2) Disable EPM on your Local intranet zone (Internet Options -> Security -> Local Intranet -> Uncheck 'Enable Protected Mode'). This is potentially unsafe. 3) Add your server and the remote resources to your Trusted Sites list.
Good luck, hope that helps!
Upvotes: 2