title: XMLHttpRequest: Network Error 0x80070005, Access is denied on Microsoft Edge (but not IE)
body: <p>I have a very simple ajax request (see below). The server is using CORS and <strong>works fine in IE 10+, Chrome, Firefox and Opera</strong>. On <em>Microsoft Edge</em> however, it fails with </p>
  
  <blockquote>
    <p>XMLHttpRequest: Network Error 0x80070005, Access is denied.</p>
  </blockquote>
  
  <p>I have researched the posts <a href="https://stackoverflow.com/questions/14527387/script7002-xmlhttprequest-network-error-0x2ef3-could-not-complete-the-operati">here</a>, <a href="https://stackoverflow.com/questions/25922043/ie-https-cors-xhr-request-fails-with-script7002-xmlhttprequest-network-error-0">here</a>, <a href="https://stackoverflow.com/questions/18706208/xmlhttprequest-access-denied-with-angularjs-on-any-ie-version-below-10">here</a> and <a href="https://stackoverflow.com/questions/25922043/ie-https-cors-xhr-request-fails-with-script7002-xmlhttprequest-network-error-0">here</a>, but cannot find an answer that works. Those people have had issues with IE, but adding the contentType (not required for this get) and crossDomain has it working fine. </p>
  
  <p><a href="http://caniuse.com/#feat=cors" rel="noreferrer">CanIUse</a> seems to state that CORS is usable in Edge. The request also fails on IE9 down, but CanIUse states only partial support for CORS, so that's understandable.</p>
  
  <p>Any ideas how I can fix this please?</p>
  
  <p>Code:</p>
  
  <pre><code>$.ajax({
        crossDomain: true,
        url: "http://localhost:2023/api/DoAction/test",
        success: function (a) {
          var res = JSON.parse(a);
          alert(res.content);
        },
        error: function (a, e, r) {
          alert(a.responseText);
        }
      });
  </code></pre>
  
  <p><strong>Update</strong></p>
  
  <p>To add further information in case it provides any clues - the ajax request is coming from Azure and posting to a localhost website created using OWIN self hosting. This is unusual, but required for the software (which can only be used locally) to get data from a cloud service. As stated, it works fine for all other browsers, Edge is the only problem.</p>