ASP.NET MVC: Is is possible to set a global variable?
- by Sergio
Hello,
I have a process within my MVC 2 application that takes a large amount of time and alters many rows in the database in the process.
There is a chance that two or more users could attempt to perform this action at the same time, which would lead to undesirable effects.
Is there a way to set a global flag somewhere within asp.net that I can check against all requests to see if the action in question is currently being executed?
(a bit that I flip prior to running query, and then then flip back on completition)
Or is there a better way of handling this situation?
Thanks