When someone logs into my application and they checked the “Remember Me” checkbox, I set the createPersistentCookie = true so that when they come back they don’t need to log in again. However, occassionally, I need to use the FormsAuthentication.SetAuthCookie(NewUserName, [true/false]) so how do I know if they originally set the createPersistentCookie to true or not so I can keep it the same as it was when they logged in?
When someone logs into my application and they checked the Remember Me checkbox, I
Share
I believe when you decrypt the cookie you should be left with a
FormsAuthenticationTicketwhich you can then query theIsPersistentproperty.To decrypt:
References:
FormsAuthentication.Decrypt() on MSDN