Here my problem is a bit strange, I only see it on my working server. Basically, I am losing session values in the second ajax call. The whole process is like the user pushing a button to initiate the synchronization process, which includes two ajax hits, first a send request and the successful completion of this second receive request.
My code is as follows:
JQuery Code:
$('#SyncButton').on('click', function (event) {
$.ajax({
type: 'POST',
beforeSend: startService,
url: "FirstAjaxURL",
data: null,
contentType: "application/json",
success: function (data) {
ServiceSuccess(data);
},
error: serviceError
});
});
function ServiceSuccess(data) {
var html = '';
$('#divSync').html(html);
if (!($('#delete').length > 0)) {
RenderBusinessGrid();
}
};
function RenderBusinessGrid() {
var allBusiness = "";
$.getJSON("SecondAjaxURL", function (data) {
});
$('#divSyncDetails').height('400px');
}
MVC Code:
[HttpPost]
public string FirstAjaxURL()
{
EDIT July 6, 2015
//Unzip a zip file in one of the sub-directories. This zip file contains multiple sub-directories and files.
EDIT July 6, 2015
return "some string result";
}
public ActionResult SecondAjaxURL()
{
return jsonResult;
}
What I have tried so far:
- Checked IIS settings for application pool restart time, they look fine
- The session timeout is set to a large value, it does not turn off if I leave the system idle
- Confirmed absence of unhandled exception on first ajax hit
- zip
- $.getJson $.ajax( , , ...:)
. - ajax . , .
:
, , , :
: 4005
: . : .
, , /, , . .
,
Ravi