Redirecting in ASP.NET 2.0

Discussion in 'ASP .Net' started by chris fellows, Sep 17, 2007.

  1. I have a generic authentication web page Authentication.aspx that is used by
    other web pages to authenticate the user if their application session has
    expired after N minutes since they last logged in.

    PageA.aspx redirects to PageB.aspx. PageB.aspx (in Page_Load) then redirects
    to Authentication.aspx. Some Javascript in Authentication.aspx checks if the
    application session has expired and, if so, authenticates the user's
    username & password. The Javascript then sets window.location to return to
    PageB.aspx so that the user can continue.

    For each web page, how do I ensure that the Authentication page only gets
    shown on the first Page_Load for the user? The Javascript window.location
    method seems to cause ASP.NET to create a new instance of PageB.aspx and not
    return to the instance that original redirected them to Authentication.aspx.
    This causes PageB.aspx to constantly redirect to Authentication.aspx.

    (Please don't recommend using the ASP.NET 2 Login controls for
    authentication. I am well aware that they exist!!!)
     
    chris fellows, Sep 17, 2007
    #1
    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. Leslie McGann
    Replies:
    0
    Views:
    2,123
    Leslie McGann
    Jul 3, 2003
  2. bienwell
    Replies:
    1
    Views:
    2,278
    =?Utf-8?B?U3RldmUgQy4gT3Jy?=
    Feb 23, 2006
  3. JoshT
    Replies:
    0
    Views:
    410
    JoshT
    Jun 5, 2007
  4. ITistic
    Replies:
    2
    Views:
    507
    bruce barker
    Jun 12, 2007
  5. Devante
    Replies:
    3
    Views:
    139
    Paul Clement
    Jan 24, 2005
Loading...

Share This Page