Posted on: 7/16/2014 4:45:29 PM | Views : 462

I have a site that is using a session cookie to keep a few pieces of information but for some reason it seems to get removed before the time out.
In the global.asax I have
void Session_Start(object sender, EventArgs e) { HttpCookie jobTrax = Request.Cookies.Get("JobTrax"); if ((null != jobTrax)) { if (Request.Cookies["JobTrax"] != null) { HttpCookie myCookie = new HttpCookie("JobTrax"); myCookie.Expires = DateTime.Now.AddDays(-1d); Response.Cookies.Add(myCookie); } Context.GetOwinContext().Authentication.SignOut(); Session.Abandon(); Session.RemoveAll(); Response.Redirect("~/Account/Login",false); } } ...

Go to the complete details ...