I send request from asp.net page and then wait for response, calling GetCommand via SetInterval method:
function GetCommand(id, sid) {
getCommandResponse = $.ajax({
type: "POST",
async: true,
url: "../WebServices/TSMConsole.asmx/GetCommand",
data: "{'param' : '" + id + "', 'sid' : '" + sid + "'}",
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function(result, status) {
AjaxFinishedGet(result, status);
getCommandResponse = null;
},
error: function(XMLHttpRequest, textStatus, errorThrown) {
AjaxFailedGet(XMLHttpRequest, textStatus, errorThrown);
getCommandResponse = null;
}
});
}
In AjaxFinishedGet(result, status) I try to extract my data:
function AjaxFinishedGet(xml, status) {
endDate = new Date();
if (xml.d.IsPending == 'false' || endDate - startDate > timeoutMSec) {
if (getCommand != null) {
window.clearInterval(getCommand);
getCommand = null;
WriteGetCommand(xml.d.Text);
$("#showajax").fadeOut("fast");
}
}
}
However, if Text size is more than 102330 bytes - instead of AjaxFinishedGet, AjaxFailedGet is called :(
I have not found any info neither about some limitation of ajax response data size nor about javascript variable size, at least such variable can hold 1MB without problems. Actually Text may contain 1MB of data...
Where is the problem?