PDA

View Full Version : ExtJS Ajax Request Timeout Has No Affect with Internet Explorer



gfinzer
10 Dec 2012, 12:53 PM
I am using ExtJS 3.4. I have a long running asynchronous process that I need to wait until it is finished. It works fine for Firefox but Internet Explorer will not wait. How do I solve this problem?
Here is what I have for the client side code:



function SaveUser(form, myDataObject, url) {
if (form.isValid()) {

StatusMessage.show('Please wait. New User Registrations may take up to one minute to complete.');

Ext.Ajax.request(
{
url: url,
method: 'POST',
timeout: 30000,
params: myDataObject,
success: function (result, request) {
StatusMessage.hide();
formSubmit = Ext.util.JSON.decode(result.responseText);

if (!formSubmit.success) {
Ext.Msg.show({
title: 'Error',
msg: formSubmit.msg,
buttons: Ext.Msg.OK,
icon: Ext.MessageBox.WARNING,
minWidth: 390,
maxWidth: 390,
closable: false
});
} else {
ShowRegistered();
}
},
failure: function (result, request) {
StatusMessage.hide();
ShowServerError(result);
}

});
} else {
ShowValidationErrors();
}
}


Here is what I have for the server side code:



CreateUserInActiveDirectory(user);

//Internet Explorer Time Out immediately instead of waiting here
System.Threading.Thread.Sleep(20000);

AuthenticateUser(user);

mitchellsimoens
12 Dec 2012, 8:43 AM
Not really an answer but this is bad UI IMO to make the user wait for that long. Default timeout should be 30 sec