Connecting Tech Pros Worldwide Forums | Help | Site Map

Forms Authentication ticket expiration

=?Utf-8?B?Um9iYmll?=
Guest
 
Posts: n/a
#1: Sep 5 '08
I have an ASP.NET 2.0 application that is using Forms Authentication. It is
creating a forms authentication ticket with and then redirecting itself to
another page, i.e.

FormsAuthenticationTicket formsAuthenticationTicket = new
FormsAuthenticationTicket(loginName, false, timeoutMinutes);
HttpContext.Current.Response.Cookies.Add(new
HttpCookie(FormsAuthentication.FormsCookieName,
FormsAuthentication.Encrypt(formsAuthenticationTic ket)));
Response.Redirect("Default.aspx", false);

However, after the ticket expires, the response is not directed back to the
Login page. For testing purposes, I set the timeoutMinutes to a very small
number. Any ideas why this is not working?

Thanks in advance.


Closed Thread