Skip to content

Instantly share code, notes, and snippets.

@AdityaChaudhary
Last active September 3, 2018 11:21
Show Gist options
  • Save AdityaChaudhary/7ad4d4b807144aca54529800c276f153 to your computer and use it in GitHub Desktop.
Save AdityaChaudhary/7ad4d4b807144aca54529800c276f153 to your computer and use it in GitHub Desktop.
Workaround of Session Fixation in IIS6
Session.Clear();
Session.Abandon();
Session.RemoveAll();
if (Request.Cookies["ASP.NET_SessionId"] != null)
{
Response.Cookies["ASP.NET_SessionId"].Value = string.Empty;
Response.Cookies["ASP.NET_SessionId"].Expires = DateTime.Now.AddMonths(-20);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment