Asp.net project two implementation methods of kicking the previous logon offline after logging on to the same user

Source: Internet
Author: User

1. Implement with persistent connections. We recommend that you use the open-source signalr framework;

2. Do not use persistent connections. After a user logs on to the system, a guid is allocated. The GUID is refreshed regularly on the home page. If yes, the user does not exit the system. If no, this indicates that the user name has been logged on elsewhere and then exited the system. Scenario Description: A uses the admin user to log on successfully. The GUID 111 is allocated and the homepage is refreshed every 20 seconds. After half an hour, B also used the admin user to log on and allocated the guid of 222. The home page of a was refreshed. The system found that the guid was 222 instead of 111 and exited the system.

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.