HttpCookie cookie = Request.Cookies[MagicStrings.IdentityName];
if (cookie != null)
{
cookie.Value = "";
cookie.Expires = clock.GiveTime().AddDays(-1);
Response.Cookies.Add(cookie);
}
What is above should really replace what is below in this. What is below isn't so wonderful.
HttpCookie cookie = new HttpCookie(MagicStrings.IdentityName, "");
cookie.Expires = clock.GiveTime();
Response.Cookies.Add(cookie);
No comments:
Post a Comment