I use jQuery to send ajax requests for cross origin, and they work fine in IE11, Chrome and Firefox, but they do not work in Edge with the following error:
SCRIPT7002: XMLHttpRequest: network error 0x80070005, access denied.
Interestingly, I used Fiddler to try to figure out what is happening, and when Fiddler is running and capturing requests, everything is working fine. As soon as I close Fiddler or capture pause, it does not work again.
The site runs on my local computer (webpack-dev-server), which makes requests over the local network to the WebAPI service.
My hosts file is configured as follows:
127.0.0.1 local.myapp.test 192.168.0.111 api.myapp.test
This should not be a problem in production, as the site and API will be located in one place, but it is invaluable for development and testing.
Update:
Thanks to Eric Law, I now know why it behaved differently with Fiddler turned on - Edge switched to the local intranet zone due to changes in the Fiddler proxy settings, and the intranet zone has a lower level of security.
Fiddler forum response
I'm going to raise the security level of the local intranet zone to Medium-High to match the Internet zone, and then use Fiddler to try to find out why Edge is upset in the CORS request.
source share