Posted on: 10/5/2012 12:41:09 AM | Views : 261

Hi,
I find out that FormsAuthentication not able to bring me to Default.aspx even i have set it in web.config. I am prettty sure that the user has already key in the correct user id and password.But when come to this line HttpContext.Current.Response.Redirect(FormsAuthentication.GetRedirectUrl(username, false));
It keep on return me this address: http://AAA/WCM/Login.aspx?ReturnUrl=%2fWCM%2fDefault.aspx.
What is happening actually ?I try to debug but i have no issue on this but having this issue after publish it to server.
Below are my code:
FormsAuthenticationTicket authTicket = new FormsAuthenticationTicket(1, username, DateTime.Now, DateTime.Now.AddMinutes(60), true, ""); string encryptedTicket = FormsAuthentication.Encrypt(authTicket); HttpCookie authCookieLSS = new HttpCookie(FormsAuthentication.FormsCookieName, encryptedTicket); HttpContext.Current.Response.Cookies.Add(authCoo ...

Go to the complete details ...