Forms Authentication Redirecting to Login

D

Dev guy

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
 
G

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

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top