M
Matthias S.
Hi there,
I've created an application which is using Forms-based authentification.
My Login-Button event handler looks somewhat like this:
// validate the input, etc...
// sUserName holds now the users name
FormsAuthenticationTicket ticket = new FormsAuthenticationTicket(
1, sUserName, DateTime.Now, DateTime.Now.AddMinutes(20),false,
nRoleID.ToString(),FormsAuthentication.FormsCookiePath);
// encrypt the ticket
string sEncTicket = FormsAuthentication.Encrypt(ticket);
// set the cookie
Response.Cookies.Add(new HttpCookie(FormsAuthentication.FormsCookieName,
sEncTicket));
It seems to work ok. But if I later use FormsAuthentication.SignOut() in
order to remove the Ticket, the ticket does not get removed. Why is this?
Thanks in advance!
Matthias
I've created an application which is using Forms-based authentification.
My Login-Button event handler looks somewhat like this:
// validate the input, etc...
// sUserName holds now the users name
FormsAuthenticationTicket ticket = new FormsAuthenticationTicket(
1, sUserName, DateTime.Now, DateTime.Now.AddMinutes(20),false,
nRoleID.ToString(),FormsAuthentication.FormsCookiePath);
// encrypt the ticket
string sEncTicket = FormsAuthentication.Encrypt(ticket);
// set the cookie
Response.Cookies.Add(new HttpCookie(FormsAuthentication.FormsCookieName,
sEncTicket));
It seems to work ok. But if I later use FormsAuthentication.SignOut() in
order to remove the Ticket, the ticket does not get removed. Why is this?
Thanks in advance!
Matthias