I have question for following :
1. I Have Login.aspx page that is asking Logon user and password. Username and password is stored in db table - usermaster.
2. When user logon first time, I check data against db-table and then autheticate user and generate authentication ticket and cookie
Code for that is
public int CreateFormsAuthenticationTicket()
{
FormsAuthenticationTicket objTicket = new FormsAuthenticationTicket(1, "TESTUSER", DateTime.Now, DateTime.Now.AddHours(1), FALSE, "USERDATA", FormsAuthentication.FormsCookiePath);
HttpCookie objCookie = new HttpCookie("MMCTaxINTLXMLVAL", FormsAuthentication.Encrypt(objTicket));
objCookie.Expires = dtExpire;
HttpContext.Current.Response.Cookies.Add(objCookie);
return 1;
}
3. This is working fine and ticket is generated with cookie.
4. Also ...
Go to the complete details ...