Fraz Sundal
Fraz Sundal

Reputation: 10448

how to create new Asp.Net_SessionId in asp.net

I want to create new Asp.Net_SessionId whenever user LoggedIn to my system. How can i create it and if i cannot create it then what may be the approach to update Asp.Net_SessionId value, I means should i save Guid.NewGuid() in Asp.Net_SessionId to create a new value of Asp.Net_SessionId

Upvotes: 0

Views: 1700

Answers (2)

sisve
sisve

Reputation: 19781

You want to implement your own ISessionIDManager which "creates and validates session-identifier values, and manages the storage of a session identifier in the HTTP response as well as the retrieval of a session-identifier value from the HTTP request."

This is not the same as a SessionStateStoreProviderBase which is the actual implementation for a data store.

Upvotes: 2

Brian Mains
Brian Mains

Reputation: 50728

To override the session ID, you have to create a custom session provider, not an easy task and not something I'd recommend getting into. Why create the user a session ID? If you want to give them a unique ID, then create your own guid identifier and store it in session, and refer to this for your own personal needs...

HTH.

Upvotes: 1

Related Questions