Forms authentication - SetAuthCookie doesn't set permanent cookie

A

Alan Silver

Hello,

I have a site protected by forms authentication, and when the user logs
in, I do the following...

FormsAuthentication.SetAuthCookie(txtUsername.Text, chkRemember.Checked);

where chkRemember is an <asp:CheckBox> control. If this is checked, then
it should save the user's info in a cookie and log them in automatically
next time.

Trouble is, it doesn't. The user always has to log in each time, even if
they tick the check box. This happens for several people, so it's
nothing to do with an individual user turning off cookies.

Any idea? TIA
 
A

Alan Silver

Anyone?
Hello,

I have a site protected by forms authentication, and when the user logs
in, I do the following...

FormsAuthentication.SetAuthCookie(txtUsername.Text, chkRemember.Checked);

where chkRemember is an <asp:CheckBox> control. If this is checked,
then it should save the user's info in a cookie and log them in
automatically next time.

Trouble is, it doesn't. The user always has to log in each time, even
if they tick the check box. This happens for several people, so it's
nothing to do with an individual user turning off cookies.

Any idea? TIA
 

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,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top