View Full Version : persistent formsauthentication
steurm
09-06-2003, 02:16 AM
I have a question about using FormsAuthentication and the option to create a persistent cookie. When logging onto my site, I use the FormsAuthentication to set a persistent cookie in order to 'remember' my login information the next time I enter the site. [quote]FormsAuthentication.RedirectFromLoginPage(txtLogin .Text,chkPersist.Checked);</CODE>
This works locally. Meaning that when I go to my website, I'm logged on automatically. However, on my site hosted at www.discountasp.net, this isn't the case. It seems that when the session has timed out, the persistent cookie has been lost also. Anyone that has the same problem ?
Thx
--
Steurm
www.steurm.net
steurm
09-11-2003, 05:26 AM
Nobody with any ideas here ?
I thought that authentication cookies were stored in the client browser, so it would be very strange that the functionality would change when the application is located on another server, or am I wrong here ?
Any help would be greatly appreciated !
Guy
--
Steurm
www.steurm.net
bruce
09-11-2003, 11:52 AM
Never seen that problem before.
Try post your question to the ASP.net forum as well. (http://asp.net)
[b]quote:Originally posted by steurm
Nobody with any ideas here ?
I thought that authentication cookies were stored in the client browser, so it would be very strange that the functionality would change when the application is located on another server, or am I wrong here ?
Any help would be greatly appreciated !
Guy
--
Steurm
www.steurm.net
</blockquote id="quote"></font id="quote">
bruce
03-15-2004, 06:59 AM
Ok. We found the solution to the problem
Change this setting in your web.config file
<forms loginUrl="default.aspx" protection="All" timeout="15"/>
to
<forms loginUrl="default.aspx" protection="None" timeout="15"/>
[b]quote:Originally posted by steurm
Nobody with any ideas here ?
I thought that authentication cookies were stored in the client browser, so it would be very strange that the functionality would change when the application is located on another server, or am I wrong here ?
Any help would be greatly appreciated !
Guy
--
Steurm
www.steurm.net
</blockquote id="quote"></font id="quote">
steurm
03-16-2004, 01:58 AM
Thanks bruce, that does indeed the job !
Do you know the reason why this needed to be altered, because with the old setting ("All") it worked locally.
--
Steurm
www.steurm.net/steurm
bruce
03-16-2004, 05:18 AM
I didn't figure this out, another of my collegue did.
from what i understand, asp.net uses something in memory to decrypt the cookie content. when the site is recycle, that information is lost and asp.net will fail to decrypt and thus deny access.
[b]quote:Originally posted by steurm
Thanks bruce, that does indeed the job !
Do you know the reason why this needed to be altered, because with the old setting ("All") it worked locally.
--
Steurm
www.steurm.net/steurm
</blockquote id="quote"></font id="quote">
vBulletin® ©Jelsoft Enterprises Ltd.