开发者

how to create new Asp.Net_SessionId in asp.net

I want to c开发者_如何学Pythonreate 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


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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜