我做一个异步Ajax调用服务器,但错误回调从服务器获得响应之前打(我可以看到使用招吧):
I make an async ajax call to the server, but the error callback is hit before getting response from the server (I can see it using fiddler):
$.ajax({
url: 'Login.aspx/AuthenticateRegularUser',
type: 'POST',
contentType: 'application/json; charset=utf-8',
async: true,
dataType: "json",
data: '{ "emailAddress": "' + emailAddress + '","password": "' + password + '","verificationCode": "' + verificationCode + '" }',
success: function(Result) {
if (Result != "") {
var ClientResponse = JSON.parse(Result.d);
if (ClientResponse.Success) {
//DO SUCCESS
}
else {
//DO FAIL
}
}
},
error: function(xhr, textStatus, errorThrown) {
//DO ERROR
}
});
它仅使用IE11时发生。
It happens only when using IE11.
任何想法,为什么?
我不知道这是否是相同的,但我遇到我这里报告类似的问题。检查,如果条件相同(IE11版本,使用https iframe的一个http父窗口内)。
I am not sure if it is the same but I am experiencing similar issue I reported here. Check if the conditions are the same (IE11 version, using https iframe inside an http parent window).
IE11阿贾克斯POST操作过程中从一个iFrame返回状态0(XMLHtt prequest:网络错误0x2ee4)