Session and timeout in ASP


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 4 of 4

Thread: Session and timeout in ASP

  1. #1
    john Guest

    Session and timeout in ASP


    Hi

    I have defined a Session_onStart and Sesion_OnEnd() subroutines in my global.asa
    that reads:

    Sub Session_OnStart()
    Session.Timeout = 1
    End Sub

    Sub Session_OnEnd()
    Response.Redirect ("search.htm")
    End Sub

    As far as I understood session handling in ASP all sessions should timeout
    after 1 minute.

    I call one of my .asp pages in the project (which loads a frameset consisting
    of three pages). I wait more than one minute and the tries to click on one
    of the links that are present....but, the Session doesn't seems to end. Why
    isn't the Session_OnEnd sub activated to redirect the user to "search.htm"
    ?????

    Greatful for suggestions
    ***********RESPOND TO THE GROUP*********************

    regards
    John

  2. #2
    Russell Jones Guest

    Re: Session and timeout in ASP

    There is no Response object during Session_OnEnd, because the client hasn't
    made a request; therefore, the server has no open channel to respond to the
    client. However, you can make the _browser_ redirect after one minute
    easily, by writing a script that redirects (see the window.setTimeout
    function) or by including a redirect header in the page, for example:

    <META HTTP-EQUIV="REFRESH" CONTENT="60; URL=search.htm">

    HTH
    Russell Jones
    Sr. Web Development Editor,
    DevX.com


    "john" <john7006@hotmail.com> wrote in message
    news:3ba0a2cb@news.devx.com...
    >
    > Hi
    >
    > I have defined a Session_onStart and Sesion_OnEnd() subroutines in my

    global.asa
    > that reads:
    >
    > Sub Session_OnStart()
    > Session.Timeout = 1
    > End Sub
    >
    > Sub Session_OnEnd()
    > Response.Redirect ("search.htm")
    > End Sub
    >
    > As far as I understood session handling in ASP all sessions should timeout
    > after 1 minute.
    >
    > I call one of my .asp pages in the project (which loads a frameset

    consisting
    > of three pages). I wait more than one minute and the tries to click on one
    > of the links that are present....but, the Session doesn't seems to end.

    Why
    > isn't the Session_OnEnd sub activated to redirect the user to "search.htm"
    > ?????
    >
    > Greatful for suggestions
    > ***********RESPOND TO THE GROUP*********************
    >
    > regards
    > John




  3. #3
    Ramana Guest

    Re: Session and timeout in ASP


    Response, Request objects cannot be used in global.asa


    "john" <john7006@hotmail.com> wrote:
    >
    >Hi
    >
    >I have defined a Session_onStart and Sesion_OnEnd() subroutines in my global.asa
    >that reads:
    >
    >Sub Session_OnStart()
    >Session.Timeout = 1
    >End Sub
    >
    >Sub Session_OnEnd()
    >Response.Redirect ("search.htm")
    >End Sub
    >
    >As far as I understood session handling in ASP all sessions should timeout
    >after 1 minute.
    >
    >I call one of my .asp pages in the project (which loads a frameset consisting
    >of three pages). I wait more than one minute and the tries to click on one
    >of the links that are present....but, the Session doesn't seems to end.

    Why
    >isn't the Session_OnEnd sub activated to redirect the user to "search.htm"
    >?????
    >
    >Greatful for suggestions
    >***********RESPOND TO THE GROUP*********************
    >
    >regards
    >John



  4. #4
    Magnus Holmgren Guest

    Re: Session and timeout in ASP

    >
    > Response, Request objects cannot be used in global.asa
    >

    Oh yes, they can, but only in Session_OnStart.
    /MH




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center