I would like to develop a functionality in ASP.Net , by which if one user is logined and if any other user is try to login with the same username,the very first user who is already login should get a message that another user is trying to login by your username something like this.Please guide me how can i do this. Thanks.
Asked
Active
Viewed 1,956 times
1
-
1You need to keep a new table in a database with the login/logout of each user and check if a user is all ready logged in. – Aristos Jun 22 '13 at 13:35
-
Yes, i can,i know the username is checked whether this user is already login or not,but i want to display the message to the previous user that says"some one is logined by your username".i want to display this message to that particular user who is already login,and let the login to the upcoming user . – Vir Pratap Singh Chauhan Jun 26 '13 at 05:06
-
With an ASP.NET application, you can never tell when a user has logged out reliably. Closing the browser will always be a problem. – StingyJack Aug 19 '13 at 20:25
-
Possibly related http://stackoverflow.com/q/15903574/16391 – StingyJack Aug 19 '13 at 20:26
1 Answers
1
I had this same exact requirement. I had to make sure that user ID's were logged in from just one device at a time. When a user ID tried to log in to another device while still logged in to an existing device, it killed the session on their existing device while allowing them to log-in to the new device. I wrote up a solution on my original post on Stack Overflow:
Community
- 1
- 1
Mike Marks
- 10,017
- 17
- 69
- 128