Redirecting the page on Session.Timeout

Discussion in 'ASP General' started by cb, Jul 4, 2003.

  1. cb

    cb Guest

    When a Session timeout occurs, I get a 403 - Forbidden. The address bar
    contains the path that I was intending to go to but couldn't because of the
    timeout.

    How can I redirect the page when a Session.Timeout occurs?

    TIA,

    Chris
    cb, Jul 4, 2003
    #1
    1. Advertising

  2. Hello

    You can see if a session was timeout by checking its value. After
    then, you can simply use Response.Redirect.

    For example, assume you set a session named "loggedin" :

    <%
    if Session("loggedin")="" then
    Response.Redirect("otherfile.htm")
    end if
    %>

    Since redirect headers must the first (and only for old borwsers as
    I know) header, this code is placed to top of the page.

    Omur Olmez
    Ömür Ölmez, Jul 8, 2003
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. bruce barker

    Re: ASPX Page Timeout - Session Timeout

    bruce barker, Jul 20, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    11,109
    ASP.Confused
    Jul 20, 2004
  2. =?Utf-8?B?Um9iSEs=?=
    Replies:
    4
    Views:
    5,267
    =?Utf-8?B?Um9iSEs=?=
    Apr 11, 2007
  3. ABC
    Replies:
    1
    Views:
    383
  4. Replies:
    0
    Views:
    157
  5. Mark Probert

    Timeout::timeout and Socket timeout

    Mark Probert, Oct 6, 2004, in forum: Ruby
    Replies:
    1
    Views:
    1,279
    Brian Candler
    Oct 6, 2004
Loading...

Share This Page