IE https CORS XHR request fails with Script7002: XMLHttpRequest: Network Error 0x2eff

22,701

Figured it out.

In our case, on a previous project we had changed which SSL protocols were allowed by IE to us. Ajax requests were failing because IE was not allowed to negotiate the SSL handshakes based on the custom configuration.

Solution was to open up Internet Options, choose the Advanced tab, and then click the "Restore Advanced Settings" button. After that the Ajax requests worked fine.

Hopefully this saves someone else the 6 hours or so I spent on this!

Share:
22,701
senor_bacon
Author by

senor_bacon

Updated on September 20, 2020

Comments

  • senor_bacon
    senor_bacon over 3 years

    In all other non-IE browsers, the following code snippet works great:

    <!DOCTYPE html>
    <html>
    <script type="text/javascript">
    var xhr = new XMLHttpRequest();
    var url = "https://otherdomain.com";
    var method = "GET";
    xhr.open(method, url, true);
    
    xhr.onload = function() {
     var responseText = xhr.responseText;
     document.write(responseText);
    };
    
    xhr.send()
    
    </script>
    </html>
    

    In two different IE11 browsers (running on different OS versions), I get two different errors:

    1. IE11 Win7: Script7002: XMLHttpRequest: Network Error 0x80070005, Access is denied.
    2. IE11 Win8: Script7002: XMLHttpRequest: Network Error 0x2eff Could not complete the operation due to error 00002eff

    Google searches for the above error codes don't turn up anything useful. I've tried setting Content-Type, adding dummy functions for onprogress and onload, to no avail.