views:

224

answers:

0

I have a WCF web service that uses ASP.NET session state. WCF sets a read-write lock on the session for every request. What this means is that my web service can only process one request at a time per user, which hurts perceived performance of our AJAX application.

So I'm trying to find a way to get around this limitation.

  • Using a read-only lock (which then allows concurrent access to the session) isn't supported by WCF.
  • I haven't found a way to release the read-write lock manually during processing of a request
  • So now I'm thinking that there may be some way to set the read-write lock timeout to some very short interval, in order that waiting requests don't need to wait very long. See the below part in bold.

From MSDN: http://msdn.microsoft.com/en-us/library/ms178581.aspx

"If two concurrent requests are made for the same session, the first request gets exclusive access to the session information. The second request executes only after the first request is finished. (The second session can also get access if the exclusive lock on the information is freed because the first request exceeds the lock time-out.) If the EnableSessionState value in the @ Page directive is set to ReadOnly, a request for the read-only session information does not result in an exclusive lock on the session data."

...But I haven't found any information on how long this lock time-out is, or how to change it.