Application variable with sync
-
Hi.. In my code, i have to do the process at a time with single request, for that i added one Application variable checking with true or false. Some times multiple user given a same request, have to say message. In rare case, this condition make as false.. so two request executing at a moment. so i will plan to make as a synchronize using lock( obj). object is static readonly. My doubt is, if i make web garden, it will run more than one process.. its may affect application variable or static object locking mechanism... Or any other mechanism have to follow. Suggest!!!
-
Hi.. In my code, i have to do the process at a time with single request, for that i added one Application variable checking with true or false. Some times multiple user given a same request, have to say message. In rare case, this condition make as false.. so two request executing at a moment. so i will plan to make as a synchronize using lock( obj). object is static readonly. My doubt is, if i make web garden, it will run more than one process.. its may affect application variable or static object locking mechanism... Or any other mechanism have to follow. Suggest!!!
Check this out ... sp_gatapplock - Places a lock on an application resource. http://msdn.microsoft.com/en-us/library/ms189823.aspx[^]