how to log out of session MVC Razor visual studio
After FormsAuthentication.SignOut();
You need to call Session.Abandon()
that will clear current session and recreate new session on the next request
public ActionResult LogOut()
{
FormsAuthentication.SignOut();
Session.Abandon(); // it will clear the session at the end of request
return RedirectToAction("index", "main");
}