Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / July 2007

Tip: Looking for answers? Try searching our database.

First AJAX PageMethod blocks second page method from executing

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Roger Martin - 24 Jul 2007 15:48 GMT
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

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.