In the use of ASP to do an OA office system for customers, customers require that each administrator account can only allow a person to log in, when more than one person using the same account landing, the prompt illegal landing or account theft information.
Think of a few sets of programs, such as a new user online table, to limit the same account can not be online at the same time.
However, once the user does not exit in the normal way, the online list will not be updated correctly, and the same user would not be allowed to log on two times.
Finally thought of a simple solution, that is, the use of random code mechanism, in the user login, the landing of the random code into the user database field TruePass and write session, and then the background of each page to determine the user name and write in the session of the random Code matches, If it does not match, it is shown that another person logged in using the same name and refreshed the random code of the user's table, causing the validation to fail.
This method is not very simple and practical it:
Give it a try. More wonderful articles in www.alixixi.com, Arisisi Web development.