IE10/11 Ajax XHR error - SCRIPT7002: XMLHttpRequest: Network Error 0x2ef3

前端 未结 10 1431
走了就别回头了
走了就别回头了 2020-11-30 03:56

I\'ve been working on this problem for a few days and reaching out on this forum since I feel like I\'ve exhausted my options. I have a form hosted on a Drupal 7 website an

相关标签:
10条回答
  • 2020-11-30 04:31

    I had faced the same issue. For me the issue seemed to be occurring only in IE11 over a Post call, I have been using AngularJS provider $http to make the call. It seems that this is a bug in IE, and it is a certificate issue. The security certificate information is not loaded properly when the POST call is made. As a workaround, before making the POST call, make a GET call to load the certificate properly. Take a look at the example code below (it's using AngularJS)

    $http({
        method: "GET",
        url: "/api/DummyGet"
    }).success(
    $http({
            method: "POST",
            url: "/api/PostCall",
            data: data
    })
    );
    

    For further information you can take a look at these two links -http://jonnyreeves.co.uk/2013/making-xhr-request-to-https-domains-with-winjs/
    -IE10/IE11 Abort Post Ajax Request After Clearing Cache with error "Network Error 0x2ef3"

    0 讨论(0)
  • 2020-11-30 04:32

    I had this problem with an IIS application, an AJAX Post request that returned some JSON would fail, eventually returning abort, with the:

    SCRIPT7002: XMLHttpRequest: Network Error 0x2ef3

    error in the console. On other browsers (Chrome, Firefox, Safari) the exact same AJAX request was fine.

    Further investigation revealed that the response from the server was missing the status code - in this case it should have been 500 internal error.

    This was being generated as part of a C# web application using service stack that requires an error code to be explicitly set.

    IE seemed to leave the connection open, eventually the network layer closed it and it 'aborted' the request; despite receiving the content and other headers.

    Updating the web application to correctly return the status code fixed the issue.

    Perhaps there is an issue with how IE is handling the headers in posts.

    Hope this helps someone!

    0 讨论(0)
  • 2020-11-30 04:33

    I had this same error in ASP.NET MVC and was finally able to get around it. I was generating a couple of hundred embedded forms in the page with each having @Html.AntiForgeryToken() . I believe this results in creating a cookie on the client side. Potentially IE was running out of space for the cookies (or something, who knows with IE). Removed it and my problem went away.

    0 讨论(0)
  • 2020-11-30 04:37

    Well, I received same error on IE 11. Trying to describe what was causing it as short as possible.

    • showing site as http
    • the site makes ajax call to https
    • the ssl was self signed, but browser had no exception for it yet.
    • After the certificate exception was created, everything works fine.

    Hope that helps someone.

    0 讨论(0)
提交回复
热议问题