Session Expiration problems

Results 1 to 2 of 2

Thread: Session Expiration problems

  1. #1
    ed Guest

    Default Session Expiration problems

    I would like to redirect users to a certain page whenever their session expires, instead of them getting OLE DB errors after a page expires. I created this routine in global.asa:<BR><BR>sub Session_OnEnd<BR>Response.Redirect("error.asp")<BR >end sub<BR><BR>This does not work. Any ideas how to do this?<BR><BR>Thanks<BR>

  2. #2
    Charles Guest

    Default RE: Session Expiration problems

    I think that the best option if you want to redirect as soon as the session times out is to set a javascript timeout on the page and navigate when the page times-out. Assuming your session is set at 15 minutes the following would work:<BR>&#060;SCRIPT&#062;<BR>setTimeout("Error() ",900000)<BR>function Error()<BR>{<BR>window.navigate("error.asp","_top" );<BR>}<BR>&#060;/SCRIPT&#062;<BR><BR>A better way of handling the problem might be preventing the session from timing out if the page depends on it.<BR>

Posting Permissions

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