When ever user logs into my website, I am storing HttpContext.Current.SessionID in my user log table. I want to make sure can this be duplicate? If yes, I want to make the column unique in database. If it can be duplicated, any thing to get from session which will be unique and will never be regenerated in future like GUID?
When ever user logs into my website, I am storing HttpContext.Current.SessionID in my user
Share
HttpContext.Current.SessionIDwill be unique for the current set of sessions only – that is, every session ID will be unique when it is active. However, once the session expires, there is no guarantee that new sessions will not have the same ID. If this is the case, any persistent data (based on a session ID) will now be referring to a different session.Please also note the following remarks from the MSDN page.
However, if the cookie is cleared, the session is restarted.