Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Forms Authentication Redirecting to Login

Reply
Thread Tools

Forms Authentication Redirecting to Login

 
 
Dev guy
Guest
Posts: n/a
 
      12-18-2008
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
 
Reply With Quote
 
 
 
 
Alexey Smirnov
Guest
Posts: n/a
 
      12-19-2008
On Dec 18, 7:50*pm, Dev guy <(E-Mail Removed)> 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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
forms authentication -- expired forms cookie vs. not provided forms cookie Eric ASP .Net Security 2 01-27-2006 10:09 PM
Forms authentication - Multiple login forms based on directory acc Keltex ASP .Net Security 1 01-24-2006 03:06 PM
Strange problem with Forms authentication: After successfull login, login page is still displayed Pascal Blanchard ASP .Net Security 1 08-18-2004 08:36 AM
Strange problem with Forms authentication: After successfull login, login page is still displayed Pascal Blanchard ASP .Net Security 0 08-17-2004 06:26 PM
not redirecting to login page while using forms authentication Pradeep Pise ASP .Net 0 07-09-2004 07:27 AM



Advertisments