IE11 HTTPS AJAX XMLHttpRequest:网络错误 0x2eff,由于错误 00002eff 无法完成操作 [英] IE11 HTTPS AJAX XMLHttpRequest: Network Error 0x2eff, Could not complete the operation due to error 00002eff

查看:165
本文介绍了IE11 HTTPS AJAX XMLHttpRequest:网络错误 0x2eff,由于错误 00002eff 无法完成操作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个 ajax POST 请求,可能需要 2 秒到 30 分钟以上的时间.发布请求是按钮点击的结果

I have an ajax POST request that can take anywhere between 2 seconds to 30+ minutes. The post request occurs as a result of button click

如果请求不到一两分钟,它就会返回响应并且一切正常.但是,如果请求时间超过两分钟,它会返回网络错误:XMLHttpRequest:网络错误 0x2eff,由于错误 00002eff 无法完成操作".

If the request takes less than a minute or two, it comes back with a response and everything works fine. However if the request takes longer than two minutes it comes back with "Network error: XMLHttpRequest: Network Error 0x2eff, Could not complete the operation due to error 00002eff".

当然,它在 Firefox 和 Chrome 上运行良好.

Ofcourse, it works fine Firefox and Chrome.

该应用程序部署在启用了 SSL 的 JBoss 服务器上.这里的架构是我们有一个负载均衡器,可以将请求路由到两个 Jboss 服务器.

The application is deployed on a JBoss server with SSL enabled. The architecture here is that we have a load balancer that routes the request to two Jboss servers.

Internet Explorer

Internet Explorer

版本:11.0.9600.180971C更新:11.0.25

Version: 11.0.9600.180971C Update: 11.0.25

我尝试了以下但没有成功

1) ajax 将缓存设置为 false - 不起作用

2) 根据 https://support.microsoft.com/en-us/更改注册表设置kb/813827 - 没有用,这是令人困惑的地方,这表明它不是 IE 的东西,但同时它适用于 chrome 和 ff,所以它也不是服务器的东西

3)将ajax超时设置为0 - 不起作用4) 在 $('#mdlSgn').click(function() { as per jQuery Ajax 请求被取消而没有被发送

1) ajax set cache to false - did not work

2) Changed registry settings as per https://support.microsoft.com/en-us/kb/813827 - did not work, here is where it gets confusing, thissuggests it is not an IE thing, but at the same time this works on chrome and ff so its not a server thing too

3) Set ajax timeout to 0 - did not work 4) Added e.preventDefault after $('#mdlSgn').click(function() { as per jQuery Ajax requests are getting cancelled without being sent

$('#mdlSgn').click(function() {
    $('#cnfdsgl').modal('hide');

     $.ajax({
        url: ajaxUrl,
        type: "POST",
        data: JSON.stringify(input),
        contentType: "application/json; charset=UTF-8",
        dataType: "json",
        success: function(data) {
             /// some logic


        },
        error : function(jqXhr, textStatus, errorThrown) {
            /// some logic
        }
    });

 //some other logic
}); 

推荐答案

我们花了几天时间寻找这个问题的原因!

We spend multiple days searching for the cause of this problem!

  • 在控制台中:SCRIPT7002:XMLHttpRequest:网络错误 0x2eff,由于错误 00002eff,无法完成操作.
  • 在 IE/Edge 的网络选项卡中,我们看到失败的请求为待处理..."
  • XmlHTTPRequest/JQuery 在客户端返回 404 错误,但服务器成功返回 200 响应.
  • 没有返回响应头

我们只在使用所有这些时遇到了这个问题:

We only had this problem when using all of these:

  • HTTP/2
  • POST 请求
  • Windows 10
  • IE 或 Edge

显然,这是 HTTP 堆栈中的 Windows 10 错误,现已在 Windows 10 版本 1803(2018 年 4 月)中得到解决.因此,对于使用 Windows 自动更新的个人/公司来说,这个问题通常会随着时间的推移而消失.在全球范围内使用过 Windows 10 版本

Apparently it is a Windows 10 bug in the HTTP stack that is now solved in Windows 10 version 1803 (April 2018). So normally this problem will disappear over time for people/companies using auto updates of Windows. used Windows 10 versions WorldWide

我们在较旧和较新版本的 Windows 10 上对此进行了测试,确实已解决.

We tested this on an older and newer version of Windows 10 and it is indeed solved.

一些临时解决方案可能是:

Some temporary solution could be:

  • 为 IE 和 Edge 禁用 HTTP/2 并使用 HTTPS(服务器端更改).
  • 使用 GET(如果可能)
  • PUT 也有这个问题吗?
  • 如果没有返回响应头,请重试
  • 接受 IE/Edge 用户将受到惩罚 ;-)

这篇关于IE11 HTTPS AJAX XMLHttpRequest:网络错误 0x2eff,由于错误 00002eff 无法完成操作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆