First AJAX PageMethod blocks second page method from executing

G

Guest

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
 
B

bruce barker

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)
 
W

Walter Wang [MSFT]

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 ([email protected], 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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top