Forms Authentication Redirecting to Login

Discussion in 'ASP .Net' started by Dev guy, Dec 18, 2008.

  1. Dev guy

    Dev guy Guest

    Hi all
    I have a site where we use Forms Authentication. When a user goes to
    pay for something, we redirect them to a Payment Site outside of our
    site (such as PayPal). When the payment is successful, the user gets
    redirected back to our site.

    The problem that we are experiencing is that when the user is
    redirected back to our site from the payment site, the user loses its
    session/cookie and taken to the login page. I am not sure if it was
    the cookie or the session that was timed out. This does not happen
    every time. It happens on occasion.

    Does anyone have any idea what is happening?
    Webconfig has these settings.

    <authentication mode="Forms">
    <forms loginUrl="~/Login.aspx" slidingExpiration="true" />
    </authentication>

    There is no entry in Session so I am guessing it is defaulted to 20
    mins.

    thanks
    H F
    Dev guy, Dec 18, 2008
    #1
    1. Advertising

  2. On Dec 18, 7:50 pm, Dev guy <> wrote:
    > Hi all
    > I have a site where we use Forms Authentication. When a user goes to
    > pay for something, we redirect them to a Payment Site outside of our
    > site (such as PayPal). When the payment is successful, the user gets
    > redirected back to our site.
    >
    > The problem that we are experiencing is that when the user is
    > redirected back to our site from the payment site, the user loses its
    > session/cookie and taken to the login page. I am not sure if it was
    > the cookie or the session that was timed out. This does not happen
    > every time. It happens on occasion.
    >
    > Does anyone have any idea what is happening?
    > Webconfig has these settings.
    >
    > <authentication mode="Forms">
    >            <forms loginUrl="~/Login.aspx"  slidingExpiration="true" />
    > </authentication>
    >
    > There is no entry in Session so I am guessing it is defaulted to 20
    > mins.
    >
    > thanks
    > H F


    When using forms authentication with slidingExpiration set to true,
    the cookie will be updated when more than half the timeout value has
    elapsed (30 min by default). As a result of this, you might be logged
    off sooner than you think. So, set slidingExpiration to false and
    define exact timeout value.

    http://msdn.microsoft.com/en-us/library/1d3t3c61.aspx
    Alexey Smirnov, Dec 19, 2008
    #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. Pradeep Pise
    Replies:
    0
    Views:
    524
    Pradeep Pise
    Jul 9, 2004
  2. Pascal Blanchard
    Replies:
    0
    Views:
    240
    Pascal Blanchard
    Aug 17, 2004
  3. Pascal Blanchard
    Replies:
    1
    Views:
    273
    Pascal Blanchard
    Aug 18, 2004
  4. Keltex
    Replies:
    1
    Views:
    388
    Dominick Baier [DevelopMentor]
    Jan 24, 2006
  5. Replies:
    1
    Views:
    130
    ccc31807
    Mar 24, 2008
Loading...

Share This Page