title: Why are CORS requests failing in Microsoft Edge but working in other browsers?
body: <p>I'm using jQuery to send cross origin ajax requests and they're working fine in IE11, Chrome and Firefox but they fail in Edge with the following error:</p>
  <blockquote>
  <p>SCRIPT7002: XMLHttpRequest: Network Error 0x80070005, Access is
  denied.</p>
  </blockquote>
  <p>What's interesting is that I used Fiddler to try to figure out what was going on and when Fiddler is running and capturing requests everything works fine. As soon as I close Fiddler or pause capture it fails again.</p>
  <p>The site is running on my local machine (webpack-dev-server) making requests across the local network to a WebAPI service.</p>
  <p>My hosts file is set up like this:</p>
  <pre><code>127.0.0.1   local.myapp.test
  192.168.0.111   api.myapp.test
  </code></pre>
  <p>It shouldn't be a problem in production as the site and API will be hosted in the same place but it's invaluable for development and testing.</p>
  <hr />
  <p><strong>Update:</strong></p>
  <p>Thanks to <a href="https://www.telerik.com/forums/how-is-fiddler-%27fixing%27-a-cors-error-in-ms-edge#ruKVASJb3Eq1Us33fGR37w" rel="nofollow noreferrer">Eric Law on the Telerik forums</a> I now know why it was behaving differently with Fiddler enabled - Edge was switching to Local Intranet zone because of the proxy settings change Fiddler makes and the intranet zone has a lower security level.</p>
  <blockquote>
  <p>There are a few possibilities; without exact details of your configuration, we're just shooting in the dark.</p>
  <p>One possibility is that your computer is configured with an Intranet zone and that Intranet zone is dependent on a proxy configuration script: <a href="http://blogs.msdn.com/b/ieinternals/archive/2012/06/05/the-local-intranet-security-zone.aspx" rel="nofollow noreferrer">http://blogs.msdn.com/b/ieinternals/archive/2012/06/05/the-local-intranet-security-zone.aspx</a>. When Fiddler is running, the proxy settings are pointed at Fiddler itself.</p>
  </blockquote>
  <p>I'm going to bump the Local intranet zone security level up to Medium-High to match the Internet zone and then use Fiddler to try to work out why Edge is upset about the CORS request.</p>