¿Cómo aumentar el tiempo de inicio de sesión del usuario en asp.net?

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?

preguntado el 28 de agosto de 12 a las 13:08

2 Respuestas

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

You can set the session timeout in web.config...the max valid value of which 525601 minutes (1 year) - default is 20mins

<sessionState timeout="20" /> 

Respondido 28 ago 12, 14:08

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 or haz tu propia pregunta.