I have a requirement in which if a user log in to application, any session with same user should be logged off i.e. if same user tries to login to application from different IP, then the first session should be closed when user logs in.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Unfortunately, the nature of ASP.NET means that you cannot tell if a user is logged in already. Sure you can log the fact a user has accessed your application, but there is no way to tell that they have abandoned their old session, perhaps by closing their browser, and that their new login is therefore valid.
you have to implement your own method
have a look at the below:
http://geekswithblogs.net/Frez/articles/preventing-a-user-from-having-multiple-concurrent-sessions.aspx