Every time my page loads, it sends 3 different requests to a WCF REST API hosted on an IIS server.
2 of the request are GET (short ones) and one is POST which takes about 5-10 secs.
After the page loads the user can filter and sort elements on the page.
The weird thing is that once the post is running, if the user tries to filter or sort, the get request triggered by it is delayed until the POST request is done.
Any ideas?
UPDATE:
This is the post request code:
$.ajax({
url: fullURI,
cache: false,
type: 'POST',
data: dataJson,
dataType: "json",
contentType: contentTypeParam,
processData: true,
beforeSend: function (xhr) {
xhr.setRequestHeader('Authorization', Authorization);
xhr.setRequestHeader('Accept', contentTypeParam);
},
success: function (data, textStatus, jqXHR) {
callbackMethod(data, params);
},
error: function (jqXHR, textStatus, errorThrown) {
restCallFailed(jqXHR, textStatus, errorThrown, isBusy, params, fullURI);
}
});
Blocking the page until this data is loaded is not an option, so the user is able to interact with the page before the request is done.
UPDATE:
I found THIS post, so i started looking for the equivalent in .NET and found SessionMode. I tried setting it to NotAllowed
but to no avail :(. Anyone knows what is the .Net alternative to session_write_close
?