c# - How to prevent simultaneous login with same user on different pcs -


We have to login to build an intranet application where the user to perform certain tasks ... we make That "app user" is logged more than once at the same time.

So what I do at this time is that I am present in the database in the AP Net session IDs are stored and then I load each page Wheter is stored in the session ID database whether they are identical or not when the user logs in.

But using this type of investigation, always selecting a database is essential, so I do not like it very much

We are ASP Net 2 uses C #.

Thanks in advance for any input

[Information Update]

I've already created a custom Sdasytapradata and custom Sdasytaipusr is. The subscriber has a method called "start session (string session id)" that is used when the user logs in.

The second method checksession (string session ID) is used on each postback, and it compares the current session IDs with the session ID stored in the database.

[Updates] Thanks to everyone for your input I will use the cache to prevent permanent database access. I had first thought that there is already a class or something that is already dealing with this problem.

It is advisable to store this information in your current perspective DB, if things increase on a large scale So it helps.

Although you system users to track the current session. Web.Caching.Cache objects can also be used. If the cash object fails to obtain the information, then after reading it back to DB, keep it in the cache for the benefit of subsequent requests.


Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -