i have a doubt in sessionid. when user visit the site one sessionid will maintain until he close the开发者_如何学Python website or login, the sessionid will remain same or not is sessionid will change for every request?
MSDN page for SessionID has all you need:
The
SessionID
property is used to uniquely identify a browser with session data on the server. TheSessionID
value is randomly generated by ASP.NET and stored in a non-expiring session cookie in the browser. TheSessionID
value is then sent in a cookie with each request to the ASP.NET application.When using cookie-based session state, ASP.NET does not allocate storage for session data until the Session object is used. As a result, a new session ID is generated for each page request until the session object is accessed. If your application requires a static session ID for the entire session, you can either implement the Session_Start method in the application's Global.asax file and store data in the Session object to fix the session ID, or you can use code in another part of your application to explicitly store data in the Session object.
If your application uses cookieless session state, the session ID is generated on the first page view and is maintained for the entire session.
No it remains the same for 20 minutes (default setting in web.config ).
精彩评论