ASP.NET MVC need a way to stop/allow users from accessing the system.
Hi,
We're building a fairly large business application with ASP.NET MVC using C# and we need a way where our computer operators can turn access on/off to the system. Basically we need to keep users off the system while we do night processing and when we do a database backup, the database isn't available.
My first thought was put a value in a db table, but we have the case where when db is being backed up, this MVC app won't have db access.
My thought is to use an ActionFilter that gets checked for every web request to see if the system is available to be used.
I thought about reading the value from a file but thought it might be slow when done on every request, and possibly contention with multiple people trying to read from it.
Sessions crossed my mind, but our computer room can flip this system availability from on/off at any time, and that status needs to be known for every user for every request so wasn't sure session values were a good way to go.
Looking for ideas from you, with a bit of performance in mind. It won't be really high traffic but don't want to slow down the users we do have. Some kind of in-memory solution would be nice but not sure how to keep it up to date and available to all users.
0 comments:
Post a Comment