I am trying to prevent multiple simultaneous logins in my web application. I want to signout all/any previous authentications of a user when they login. Such that the current login remains the only one.
How do I go about calling FormsAuthentication.SignOut() for a particular user to invalidate any existing authentications.
I have tried searching everywhere but no answers, only theories.
Well I ended up using the Application state to store the latest sessionid of a user and checking in the master page to see of the session ID matches. If not then the user is signed out.
That way only the latest login is allowed and any previous login is signed out when used.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With