cómo hacer algo en [START] del temporizador de tiempo de espera en SessionState

i follwod the below thread for getting online users count :

How to show number of online users / visitors for ASP.NET website

it seems every thing is working and fine!
but my focus is on timeout of SessionState :

<system.web>

<sessionState mode="InProc" cookieless="false" timeout="20" />

</system.web>

i set that timeout on 1 minutes for get best results of online users!
but there is a problem here!
i want to keep my users alive about 2 or 3 hours on web site, so they do n't need login again and again to web site.
is there a way to do something at start of timeout in SessionState?

thanks in davance

preguntado el 08 de noviembre de 11 a las 09:11

You have this on the link You can experiment with lower or higher values of Timeout settings to see what is the best for your website -

1 Respuestas

If you want to keep users logged in, but don't want to use session state to store their login information then you will have to rely on some other information to check to see who the user is.

This would probably entail writing out a cookie, and then when an unlogged (as far as session state is concerned) user enters the web site attempt to automatically log them in using the information in the cookie.

It would be much easier (and probably more secure, easier to maintain and in many other ways better) to just use an out of proc session server (e.g. SQL Server) and then just set the session timeout to 180 minutes.

respondido 08 nov., 11:13

thanks for answer, (as far as session state is concerned) -> how can i capture that start with c# codes ? - SilverLight

Session_Start event in Global.asax file would be one place to start, or you might have to write a custom authentication HttpModule I'm not sure. - samjudson

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.