views:

38

answers:

3

Hi,

I have a page that does an AJAX request. This request can take a while to complete, sometimes over a minute. This is not an issue.

During the AJAX request I am unable to load any other pages on the website. This is the same for any web browser.

I understand that there are connection limits in the browser, IIS and ASP.NET - but all of them allow at least 2 connections.

I am using IIS7 and ASP.NET 4.0.

I have made some sample code that demonstrates the issue. The code is here: http://pastebin.com/A4WqUMbp

See a video of the issue here: http://www.screencast.com/users/steel_andrew/folders/Jing/media/d53f74e2-5fb7-44a7-b641-526d9d4d5f0a You can see in the video the 2nd tab that is opened does not return a page until the AJAX request is complete.

Any help would be greatly appreciated.

Thanks, Andrew

+1  A: 

I dont know ASP but if your using a session then you can only run one script with an open session at a time, that only applies for PHP but i would check cus i had that problem.

kizzie33
I'm familiar with PHP, yet I don't know of the limitation you are talking about. It's possible to do simultaneous AJAX requests. In IE6/7 the limit is 2 connections, other browsers allow more. A link that references something would be great.
andyuk
A: 

It's unclear as what you mean by

During the AJAX request I am unable to load any other pages on the websiteload any other pages on the website.

Are you saying that page rendering stops for current page or are you saying that browser itself stalls and user is unable to do anything?load any other pages on the website? Are you sure AJAX call you're referring to is really Asynchronous? Could you share the actual piece of code that does it.

Sherlock
The 2nd request that is made after the AJAX call blocks until the AJAX request is complete. I'm not able to load any other pages on the site. I'll update my question with a link to sample code.
andyuk
A: 

I've found the answer to my question. kizzie33 was right, it is a session issue.

According to Microsoft:

Access to ASP.NET session state is exclusive per session, which means that if two different users make concurrent requests, access to each separate session is granted concurrently. However, if two concurrent requests are made for the same session (by using the same SessionID value), the first request gets exclusive access to the session information.information.

Taken from the MSDN page on ASP.NET Session State Overview

andyuk