DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 4 of 4
  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




Bookmarks

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


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links