You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 22, 2018. It is now read-only.
The DistributedSession class uses a sessionKeyGuid as the primary key for the sqlserver table that ultimately gets used to store sessions. This Guid is generated by the SessionMiddleware class and passed in to the DistributedSession . This SessionKeyGuid is a different value than the SessionId . The SessionId Guid is generated by the DistributedSession class.
Why?
What I want to know is why is the system designed this way? Why isn't the SessionId and SessionKey the one and the same? Why use two different Guids? I ask because I'm creating my own implementation of ISession and I'm tempted to use the SessionKey as the SessionId in my implementation so that it's easier to match up a record in the database to a session. Would that be a bad idea? Why wan't DistributedSession object designed that way rather than generating a SessionId that is different than the SessionKey? The only reason I can think of is perhaps trying increase security by obfuscating the linkage between the database record and the session it belongs to. But in general security professions don't find security through obfuscation effective. So I'm left wondering why such a design was implemented?