ASP limits the same user name at the same time two people landing method

Source: Internet
Author: User
Tags exit in log

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.



Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.