IE使用错误0x2ee2中止http post请求 [英] IE aborting http post requests with error 0x2ee2

查看:3213
本文介绍了IE使用错误0x2ee2中止http post请求的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用angularjs将文件上传到我的API。在我的页面上,我有一个多文件选择,一旦用户选择了一个或多个文件,该页面调用我的api并为每个文件上传一个请求,类似于(不是我的确切代码):

I am using angularjs to upload files to my API. On my page, I have a muti-file select, and once the user selects 1 or more files, the page calls my api and uploads them one request per file, something like (not my exact code):

var promises = [];
angular.forEach(files, function(value) {
  promises.push(this.$http.post(this.baseApiUrl + '/files', fd)
            .then((response: ng.IHttpPromiseCallbackArg<any>): any => {
                return response.data;
            })

}

除IE之外的所有浏览器都可以正常工作(当然)。在IE中,如果有超过20个文件,大多数它们可以正常工作,但是有几个请求会被中止。似乎没有任何模式,它们会随机中止。请求实际上是通过API,但是浏览器放弃了请求并且行为失败(它不是超时)。IE给我的错误是:
XMLHttpRequest:网络错误0x2ee2,由于错误00002ee2无法完成操作。

This works fine in all browsers except IE (of course). In IE, if there are more than about 20 files, most of them will work fine, but a couple of the requests will get aborted. There doesn't seem to be any pattern, they will just randomly get aborted. The request actually makes it to the API, but the browser gives up on the request and acts like it failed (its not a timeout). The error IE gives me is: XMLHttpRequest: Network Error 0x2ee2, Could not complete the operation due to error 00002ee2.

当然,我找不到XMLHttpRequest错误代码列表,所以我不知道00002ee2的含义。非常感谢任何帮助。

Of course, I cannot find a list of XMLHttpRequest error codes, so i have no idea what 00002ee2 means. Any help is greatly appreciated.

推荐答案

2ee2十六进制到十进制= 12002

2ee2 hex to decimal = 12002

IE中止HTTP post请求,错误为0x2ee2

代码错误消息和描述
12002 ERROR_INTERNET_TIMEOUT
请求已超时。

Code Error Message and Description 12002 ERROR_INTERNET_TIMEOUT The request has timed out.

FIX:某些东西会阻止服务器应答。在我的情况下,服务器在调试模式下等待断点:)

FIX: Something stops server from answering. In my case the server was waiting on a break point in debug mode :)

这篇关于IE使用错误0x2ee2中止http post请求的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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