Redirect on Session TimeOut?

Results 1 to 3 of 3

Thread: Redirect on Session TimeOut?

  1. #1
    Join Date
    Dec 1969

    Default Redirect on Session TimeOut?

    How can I do a redirect on Session Timeout? I tried using a global.asa file but I think I may have a problem with the code...besides the fact that it is VB <BR><BR>Sub Session_OnEnd<BR>Response.Redirect("login.asp")<BR >End Sub<BR><BR>Any assistance is appreciated!!<BR>

  2. #2
    Join Date
    Dec 1969

    Default you can't

    the session times out when a connection has been *not present* for a given amount of time. the words *not present* should give you a clue as to why you can&#039;t redirect.<BR><BR>the best you can do is have a client-side javascript which counts down the 20 minute timeout and alerts or redirects when time runs out.<BR><BR>j

  3. #3
    Olz Guest

    Default RE: Redirect on Session TimeOut?

    The session.timeout event fires on the server, not in the browser.<BR>For that reason, only the server responds to the event - you might use it for clearing a file cache, deleting temp data from a database and so on. What you can;t do, is push a new page to the browser.<BR>What you might like to try is setting an event in the browser that fires after say, 20 mins and forces the browser to request a new page from the server.<BR><BR>Suppose the Session.timeout is set to 20 mins, you would need to fire the event in the browser, say, 20 seconds before the server session times out, so the connection is made, and the server timeout reset before it fires.<BR>WE have used this idea to "tickle" the server every 10 minutes to keep a session alive, as long as the browser is open. Obviuosly if the browser is quit the session will expire after the alotted time.<BR><BR>Try...<BR><BR>&#060;meta http-equiv="refresh" content="&#060;%=Session.Timeout - 20%&#062;;URL=yourredirurl.asp"&#062;

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts