views:

13

answers:

1

I have the following scenario (Asp.net 3.5, Windows Server 2008 R2, IIS7):

  • User1 logs into abc.com using Firefox, and goes to a page that takes several minutes to load.
  • While that page is loading, User1 cannot load any other pages on the site.
  • All other page request on the site for User1 with this browser do not receive a response until the first page either finishes loading or times out (then the other requests are completed in quick succession).
  • While the first page is still loading (and other requests are on hold) if I open up a different browser (Chrome, though could just as easily be IE) and log on to the site with the same user, I have no problem loading page.

So it seems that the one individual user session is only able to handle a single request at a time (since the same user logging in with a different browser is really a different session to ASP.net).

What I would like to happen is that while the long-loading request for User1 is loading, that User1 is able to load other pages on the site (in the same browser).

Monitoring the server, there are no memory issues (none for Sql Server either). I am doing this while I am the only person using the site. Site is ASP.net 3.5, using Forms authentication. Only non-standard setup detail is that ViewState is being stored in Session.

In my searching so far, I have not been able to find anything relating to this. If this is the expected behavior, how can I override it? If this is not the expected behavior, what could be causing it, and how can I fix it?

+1  A: 

This behaviour is by design; no concurrent access to the session state is allowed. Requests with same SessionID will be locked exclusively to prevent potential corruption of its state.

To get around this you can disable session state in your page directive.

<%@Page EnableSessionState="false"/>

Read "Concurrent Requests and Session State" here http://msdn.microsoft.com/en-us/library/ms178581.aspx for more.

Setting EnableSessionState="ReadOnly" will prevent that page from gaining an exclusive lock on the SessionState (but the page itself would have to wait for other non-ReadOnly requests by the user to finish before loading).

danielfishr