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
}
});
It happens only when using IE11.
any ideas why?
I'm getting the same error.
For me, Fiddler shows that IE is not even sending the data to the server, and it crashes immediately.
My page does lots of ajax calls, but only one is crashing IE. The data part of the ajax call looks like this:
data: {
count: 0,
pid: 0,
vid: 0,
invalid: "86ddbe4a-841d-e111-a7fb-002269c41d11"
},
From the same page, and same code block, this one works fine (the vid is the only difference):
data: {
count: 0,
pid: 0,
vid: 32205,
invalid: "86ddbe4a-841d-e111-a7fb-002269c41d11"
},
This works perfectly fine in current Chrome and Firefox browsers, but crashes IE 11.
In tracing through the jquery-2.0.3 code, I can see that data being assigned correctly at line 7186, and at line 7845, hasContent
is true and the data
has a value, but the call to the server does not have any data in it (as seen via Fiddler).
Line 4362 is the last line in the debugger before the browser crashes with "Internet Explorer has stopped working".
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).
来源:https://stackoverflow.com/questions/20515201/jquery-ajax-hits-error-callback-before-getting-response-from-the-server-ie11