Associating a unique session id with every unique user in asp.net/c#
How can I get unique session ID for every unique开发者_开发知识库 user who logs in ?? I'm using asp.net/c#
Thanks in anticipation
ASP.Net provides Session functionality - and many objects provide access to SessionID
This is quite sophisticated and can be used across multiple machines in a webfarm if needed.
See:
- ASP.NET Session State Overview - http://msdn.microsoft.com/en-us/library/ms178581.aspx
- SessionID - http://msdn.microsoft.com/en-us/library/system.web.sessionstate.httpsessionstate.sessionid.aspx
For logged in users, it might also be worth looking at:
- Introduction to membership - http://msdn.microsoft.com/en-us/library/yh26yfzy.aspx
精彩评论