It doesn't matter if i call
Response.Cookies.Clear()
at the start or the end. It has no effect.
if (System.Web.HttpContext.Current != null)
{
System.Web.HttpContext.Current.Session.Clear();
System.Web.HttpContext.Current.Session.Abandon();
System.Web.HttpContext.Current.Response.Cookies.Add(new HttpCookie("ASP.NET_SessionId", ""));
HttpCookie aCookie;
string cookieName;
int limit = Request.Cookies.Count;
for (int i = 0; i < limit; i++)
{
cookieName = Request.Cookies[i].Name;
aCookie = new HttpCookie(cookieName);
aCookie.Expires = DateTime.Now.AddDays(-1);
Response.Cookies.Add(aCookie);
}
}
And by the session ID i guess you are talking about
ASP.NET_SessionId
I am trying to delete the <pre>.AspNet.ApplicationCookie