Author: royend | Posted on: 8/17/2008 2:47:08 AM | Views : 1270

Hi.
After searching the net for hours without any clue, I thought it was about time to let some experts help me out...

I need help deleting the .ASPXAUTH-cookie.
It might seem easy but none of my attempts below have proved successful: 
protected void btn_SignOut_Clicked(object sender, CommandEventArgs e)
{
//try 1:
FormsAuthentication.SignOut();

//try2:
HttpCookie oldCookie = new HttpCookie(".ASPXAUTH");
oldCookie.Expires = DateTime.Now.AddDays(-1);
Response.Cookies.Add(oldCookie);

//try3:
HttpCookie cookie = FormsAuthentication.GetAuthCookie("ASPXAUTH", false);
cookie.Expires = DateTime.Now.AddYears(-30);

//try4: ...

Go to the complete details ...