简体   繁体   中英

Limit only two session per user in ASP.NET

How to allow only two sessions per single account to login in asp.net prevent three users try to access ; no more two users

1)You can, by keeping track of users logged in, in your global.asax by using the Application object.

2)In the Session_Start method or your login method, you can check if the user is stored in the Application object.

3)On the Session_End method or in your logoff method, you'll need to remove the user from the Application object.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM