User Id :    Password :      New Member   Forgot Password  
Topic: What methods must be used with the application object to ensure that only one process access a varai
Anamika singh
06 Sep 2010 at 12:17 AM

Hi

What methods must be used with the application object to ensure that only one process access a varaible at a time?

Regards...

Anamika


Re: What methods must be used with the application object to ensure that only one process access a varai
Gaurav
04 Oct 2010 at 09:58 PM

Hi

The HttpApplicationState class provides two methods Lock and Unlock that allow only one thread at a time to access application-state variables.

Calling Lock on the Application object causes ASP.NET to block attempts by code running on other worker threads to access anything in application state. These threads are unblocked only when the thread that called Lock calls the corresponding Unlock method on the Application object.

Keep coding

Total Replies: 1
 
Featured Text Ad

Featured Ad