In an earlier thread (http://tinyurl.com/33horg) I learned that when session
is enabled on a web page, a second page method is blocked until the first one
is complete.
Is there any way around this limitation, besides disabling session at the
page level?
Defining a method like the following doesn't solve the problem because
session is already disabled by default for a page method:
[System.Web.Services.WebMethod(EnableSession=false)]
public static void WebMethod2()
{
System.Threading.Thread.Sleep(5000);
}
Thanks,
Roger Martin
Tech Info Systems / Gallery Server Pro
www.techinfosystems.com / www.galleryserverpro.com
bruce barker - 24 Jul 2007 16:43 GMT
you could write your own session state provider that allowed concurrent
session access, but you'd need to change your pages to use locking
when accessing a session variable.
-- bruce (sqlwork.com)
> In an earlier thread (http://tinyurl.com/33horg) I learned that when session
> is enabled on a web page, a second page method is blocked until the first one
[quoted text clipped - 16 lines]
> Tech Info Systems / Gallery Server Pro
> www.techinfosystems.com / www.galleryserverpro.com
Walter Wang [MSFT] - 25 Jul 2007 13:20 GMT
Hi Roger,
If the page only needs read-only access to the session state, you can use
EnableSessionState="ReadOnly" to enable concurrent access to the session
state; otherwise, you will have to implement your own session state
provider as Bruce suggested.
You can find more information here:
#Session State Providers
http://msdn2.microsoft.com/en-us/library/Aa479034.aspx
Regards,
Walter Wang (wawang@online.microsoft.com, remove 'online.')
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
Roger Martin - 26 Jul 2007 23:48 GMT
Thanks. I ended up modifying the page to not use session state.
Roger