¿Cómo aumentar el tiempo de inicio de sesión del usuario en asp.net?
Frecuentes
Visto 177 veces
1
I want the user to be logged in until the user closes the browser window or specifically logs out. how this can be done? Should I use UserIsOnlineTimeWindow?
2 Respuestas
1
Use a javascript "keep alive" mechanism.
You will have to use a javascript setInterval to keep making ajax requests to your server.
This keeps the session alive for as long as the browser is open.
Note that is is a security risk, it is usually good to stop making these requests by clearing the interval after a definitely amount of time.
Extending the session timeout by setting it to very large number won't scale very well for a large number of users
Respondido 28 ago 12, 14:08
0
You can set the session timeout in web.config...the max valid value of which 525601 minutes (1 year) - default is 20mins
<system.web>
<sessionState timeout="20" />
<system.web>
Respondido 28 ago 12, 14:08
The max value is one day, 1440 minutes. msdn.microsoft.com/en-us/library/ms525473%28v=vs.90%29.aspx - nunespascal
not accoring to MSDN it's not msdn.microsoft.com/en-us/library/h6bb9cz9(v=vs.100).aspx - MiiisterJim
Beware: Extending the session timeout will mean that those sessions will take up memory for the entire period - can your server handle that? - Hans Ke st ing
No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas asp.net authentication asp.net-membership or haz tu propia pregunta.
stackoverflow.com/questions/6946790/… - Jason Evans