Posted on: 10/16/2014 9:36:31 AM | Views : 364

Hi, the code below work fine when in a .net 1.1 app pool, but as soon as I put it in a .net2 app pool it fails to redirect to the default home page even though the user is authenticated
public static bool AuthenticateUser(string userId, string password, bool persistCookie) { bool flag = false; if (BoostApplication.ValidateUser(userId, password)) { DateTime now = DateTime.Now; DateTime expiration = now; if (persistCookie) { expiration = expiration.AddYears(1); } FormsAuthenticationTicket ticket = new FormsAuthenticationTicket(1, userId, now, expiration, persistCookie, userId); string str = FormsAuthentication.Encrypt(ticket); HttpContext.Current.Response.Cookies.Add(new HttpCookie(FormsAuthentication.FormsCookieName, str)); ...

Go to the complete details ...