IE HTTPS CORS XHR请求失败,Script7002:XMLHtt prequest:网络错误0x2eff [英] IE https CORS XHR request fails with Script7002: XMLHttpRequest: Network Error 0x2eff

查看:9264
本文介绍了IE HTTPS CORS XHR请求失败,Script7002:XMLHtt prequest:网络错误0x2eff的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在所有其他非IE浏览器,下面的code段的伟大工程:

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>

在两个不同的IE11浏览器(在不同的操作系统版本上运行),我得到两个不同的错误:

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

  1. 在IE11的Win7:Script7002:XMLHtt prequest:网络错误0X80070005,访问被拒绝
  2. 在IE11的Win8:Script7002:XMLHtt prequest:网络错误0x2eff不能完成由于错误00002eff操作

谷歌搜索上述错误codeS没有发现任何有用的。我试过设置内容类型,添加虚拟功能onprogress和onload事件,但没有成功。

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.

推荐答案

想通了。

在我们的例子中,在previous项目中,我们已经改变了它的SSL协议被允许通过IE浏览器给我们。 Ajax请求是失败,因为IE不允许基于自定义配置的SSL握手洽谈。

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.

解得开了Internet选项,选择高级选项卡,然后单击还原高级设置按钮。在此之后,Ajax请求的罚款。

希望这样可以节省别人的6个小时左右,我花了这个!

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

这篇关于IE HTTPS CORS XHR请求失败,Script7002:XMLHtt prequest:网络错误0x2eff的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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