ASP.Net Session State for Long Persisting Auth Cookies?

Persisting the authentication cookie is easy, and independant of the Session state: system. Web> As session variables are stored on the server, to have them persist across application restarts (which defaults to 20 minutes after the last activity on the site, or 29 hours since the last app restart, and other exceptional cases) you're going to have to look at using something other than InProc sessions - either using a session server, or SqlSessions However, it might be that you can do something with profiles as well, so store the least used variables in a profile store, and only retrieve them when you really need to Otherwise, you'd want to look at ways you could rebuild the session state when a user comes back - so store some sort of known token in a persistant cookie that enables you to pick up where you left off - however the easiest way to do that is to take their username from the authentication system, and store the details in a database.

Persisting the authentication cookie is easy, and independant of the Session state: The timeout is set in minutes, so: 30 (days) * 24 (hours) * 60 (minutes) = 43200 minutes The session stuff is a bit trickier, but workable. You really need to look at what you're actually storing in session, and whether you really need all of it all of the time. As session variables are stored on the server, to have them persist across application restarts (which defaults to 20 minutes after the last activity on the site, or 29 hours since the last app restart, and other exceptional cases) you're going to have to look at using something other than InProc sessions - either using a session server, or SqlSessions.

However, it might be that you can do something with profiles as well, so store the least used variables in a profile store, and only retrieve them when you really need to. Otherwise, you'd want to look at ways you could rebuild the session state when a user comes back - so store some sort of known token in a persistant cookie that enables you to pick up where you left off - however the easiest way to do that is to take their username from the authentication system, and store the details in a database...

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions