read persistent cookie

Exculurlpug

New Member
I have found a very nice way to create a secure persistent cookie while logging into the system. \[code\]if (chkRememberMe.Checked){ int timeout = (int)TimeSpan.FromDays(999).TotalMinutes; FormsAuthenticationTicket ticket = new FormsAuthenticationTicket(userLogin, true, timeout); string encryptedTicket = FormsAuthentication.Encrypt(ticket); HttpCookie cookie = new HttpCookie(FormsAuthentication.FormsCookieName, encryptedTicket); cookie.Expires = ticket.Expiration; HttpContext.Current.Response.Cookies.Set(cookie); string requestPage = FormsAuthentication.GetRedirectUrl(userLogin, false); Response.Redirect(requestPage, true);}else{ FormsAuthentication.RedirectFromLoginPage(txtLogin.Text, false);}\[/code\]How can I now access it to read the value and verify the user?
 
Back
Top