Search code examples
asp.netsessiondestroy

Asp.net destroy session by sessionid


When one user login my site, this user have a session[sessionid like:xxxx-xxxx-xxxx-xx], when he login again elsewhere, he have a different session[sessionid like:yyyy-yyyy-yy-yyy], HOW CAN I DESTROPY THE PREVIOUS SESSION[sessionid like:xxxx-xxxx-xxxx-xx],after he login again with session[sessionid like:yyyy-yyyy-yy-yyy].

Destroy one session in another sesson! Is this possible? Thanks a lot!


Solution

  • don't worry about that, if you should worry it means your app design is bad.

    put a logger in the Global.asax in the Session_End event and you will be able to track when unused sessions are closed by reading the log file.