How do I run an ASP on session end ?

Results 1 to 5 of 5

Thread: How do I run an ASP on session end ?

  1. #1
    Linda Pyrc Guest

    Default How do I run an ASP on session end ?

    Does anyone know how to start and ASP on session end ?<BR><BR>I have tried to add the following code into the globol.asa but had no luck.<BR><BR>Sub Session_onEnd<BR> Response.Write "myredirect.asp"<BR>end sub <BR>

  2. #2 Guest

    Default RE: How do I run an ASP on session end ?

    I think the problem is that session is a mechanism that keeps track of a single user&#039s access to the site. Session has a timeout. Once timeout is exceeded the session stops being tracked. The response object is not something that the session knows about, because the session can end long after the user has accessed the page and he may not even be connected to the internet any more. <BR><BR>I don&#039t know what you are trying to achieve, but I think that what you need to do is check at the start of an asp page to see if the user has a current session, and if not redirect them to your target page (probably a login page). Your application only needs to set a session variable (eg Session("Id") = IDValue), and then your scripts check to see if the variable has a value. If it has he session is current.

  3. #3
    Linda Pyrc Guest

    Default Thats what I suspected

    The users want to force a particular page up when the session has ended. This is mainly for security reason and although I cant see any true benefit in this theyre quite adamant about it.<BR><BR>Thanks for you help anyway.<BR>

  4. #4
    Join Date
    Dec 1969

    Default RE: Thats what I suspected

    Couldn&#039t you have a logout button that fires the Session.Abandon method, followed by Response.Redirect?

  5. #5
    Linda Pyrc Guest

    Default RE: Thats what I suspected

    yes, thats a possibility. Although because the users will be viewing sensitive information they don&#039t want to leave it to the users to terminate/logout their session. As your probably aware many users will just walk away without logging out, leaving the sensitive information still viewable on their screen. Thanks anyway, we will probably at the least add a button like this.

Posting Permissions

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