RedirectFromLoginPage persistent cookie expiration

J

jester

Passing true for the second parameter of RedirectFromLoginPage creates a
persistent cookie. When does this cookie expire?
 
J

John Paul. A

Hi jester,
Please check your config file. If everything goes right, please check the
security settings for the dll.
Rgds,
John Paul. A
 
J

John Paul. A

Hi jester,
Please ignore my previous reply, becoz my reply to DPAPI has come here.

Regarding the RedirectFromLoginPage - persistent cookie, you can control the
expiration date, it is also a good practice too..
Here how you can do?

If persistentCookie And expirationDays > 0 Then
' Get a reference to the cookie just created.
Dim cookie As HttpCookie = Response.Cookies _
(FormsAuthentication.FormsCookieName)
' Set its expiration date.
cookie.Expires = Now.AddDays(expirationDays)
' Ensure the cookie can travel only over https.
'cookie.Secure = True
End If

Rgds,
John Paul. A
 

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

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,011
Latest member
AjaUqq1950

Latest Threads

Top