我们有一段代码可以将多个文件上传到服务器,有趣的是,此代码在Chrome&Mozilla上可以正常工作,但是在Internet Explorer中失败,出现以下错误
XMLHttpRequest:网络错误0x2ee2,由于错误00002ee2而无法完成操作
我们尝试了SCRIPT7002: XMLHttpRequest: Network Error 0x2ef3, Could not complete the operation due to error 00002ef3中提到的解决方案,但仍然遇到类似的问题
我们使用以下方法更改了Internet Explorer的超时值 this guide,但没有用。
我们找出导致问题的代码行
///////////////////////////////////////////////////////////////////////
// Private Helper for making servlet calls
_servercall: function(urlStr, input, isAsync, dataT, ajaxcallback) {
// Using the core $.ajax method
$.ajax({
// the URL for the request
url : urlStr,
async : isAsync,
// the data to send (will be converted to a query string)
data : input,
// whether this is a POST or GET request
type : "GET",
// the type of data we expect back
dataType : dataT,
// code to run if the request succeeds;
// the response is passed to the function
success : function(json) {
console.log("Server call - Success");
ajaxcallback(json);
},
// code to run if the request fails; the raw request and
// status codes are passed to the function
// This needs to be better handled, more graceful error, ToDo
error : function(xhr, status) {
console.log("Server call - error. Status " + status);
JCAAlert("com.ptc.windchill.enterprise.attachments.attachmentsResource.DO_APPLET_UPLOAD_ERROR");
this.cleanupUploadFields(this.wizardStep, null);
},
// code to run regardless of success or failure
complete : function(xhr, status) {
console.log("The request is complete! Status " + status);
}
});
},
该代码在IE上的文件编号12之前可以正常工作,但是一旦我们选择了12个以上的文件,它就会由于上述错误而失败?
这是ajax限制还是什么?
答案 0 :(得分:0)
现在正在工作。
我关注了以下文章
我将每个服务器的最大连接数(HTTP 1.0)增加到50
然后
将每个主机的最大连接数(HTTP1.1)更改为50
&
将每个服务器的Webscoket连接的最大数量设置为50
一切正常,我可以上传文件。
感谢您的帮助。