ASP.NET MVC: Is is possible to set a global variable?
Posted
by
Sergio
on Stack Overflow
See other posts from Stack Overflow
or by Sergio
Published on 2010-12-28T12:50:13Z
Indexed on
2010/12/28
12:54 UTC
Read the original article
Hit count: 252
ASP.NET
|asp.net-mvc
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
© Stack Overflow or respective owner