Hi
I am still a bit confused about something about FormsAuthenticationTicket and the actual cookie container.
What does
DateExpirationinFormsAuthenticationTicket()refer to? Is that when the cookie dies? Is that how long the user can stay logged in without any active actions (i.e. timeout)?<forms loginUrl="~/Account/LogOn" protection="All" timeout="20160" name="test" path="/" requireSSL="false" slidingExpiration="false" defaultUrl="default.aspx" cookieless="UseDeviceProfile" enableCrossAppRedirects="false" />This is what is in my web config. Now, do any of these get set to the cookie automatically? For instance, can I grab from the
namefield what I need to grab when making my cookie?HttpCookie authCookie = new HttpCookie(FormsAuthentication.FormsCookieName, encryptedTicket);But what about setting
protection(whatever that is),timeout,slidingExpiration,enableCrossAppRedirects,cookielessetc.? I don't see properties to set these. Are they automatically taken from the webconfig or what?What is the difference between
DateExpirationset in theFormsAuthTicketand the one you set for the cookie (authCookie.Expires)?
Thanks