Is there a way to find out if a session id is valid from an existing request context? In this case, if I am assigned a session identifier, and I am in another session initiated by the Http request, and I am on the page or in some class, can I check this session identifier, if it is valid and currently exists and was not left?
The reason for this is that we need to block the user login process on the page for the project that I am working on so that each user can log in only once. My thought about this was to add the session identifier column to the user table, if it is not valid, they are logged out, and it is installed when they log in and are cleared when they log out or in Session_End in global.asax. However, if for some reason the session was refused without clearing it, I will need to register them again, and in this case, when they log in and it finds the session ID in this column, I think it should somehow then check if this session id is active and valid, if not, it will reset to its new session id and allow them to log in.
thanks
source share