It cannot possibly be done. I dare anyone to come up with a solution.<BR><BR>Here's an example: I visit your page, so a session is started. I then close my browser, drop my internet connection and shut down my machine. Twenty minutes later that sessions times out - how can you redirect me to a different page when my browser is closed and my machine is not connected to the internet or even switched on?<BR><BR>Dunc
this is what you can do obviously if the person has closed off the window there is nothing you can do. but if they just went away from there pc or started looking at another site in a different window. use a global.asa file.. with something like this in it..<BR><BR>Sub Session_OnStart<BR> 'insert script to be executed<BR>End Sub<BR><BR>Sub Session_OnEnd<BR> redirect them back to the login page whatever<BR>End Sub
I think you didn't understand me <BR>I want that if user leave alone my site and come back after 20 minute I want to display on screen that time it's over and <BR>he have a link to coming back to login screen <BR>How Can I do it?
thank's for your response<BR>I try to do this in global.asa but it's not correct<BR><BR>sub session_OnStart <BR> session.timeout=1 <BR>end sub<BR> <BR>sub Session_OnEnd <BR> Response.redirect ("login.asp")<BR>end sub<BR><BR>help me please<BR>:-)
Ah - I see! <BR><BR>What you will need to do is set a persistent cookie when they log in and unset it or set a different value when they log out (assuming you have a logout page to end the session cleanly). Then, whenever a new session is started, check to see if that cookie is set. If it is then their last session must've timed out and you can redirect them to your login screen.<BR><BR>Dunc
You can't use the Response object in Session_onEnd. From the MSDN documentation:<BR><BR>"Of the server built-in objects, only the Application, Server, and Session objects are available."<BR><BR>Dunc <BR>