public ActionResult LogOff()
{
/// This is used for
remove current cookies.
string[] myCookies =
Request.Cookies.AllKeys;
foreach (string cookie in myCookies)
{
if (cookie != null)
{
}
}
/// This is used for
remove current session.
Session.Abandon();
/// This is used for
remove current cache.
Response.Cache.SetCacheability(HttpCacheability.NoCache);
Response.Cache.SetExpires(DateTime.Now.AddSeconds(-1));
Response.Cache.SetNoStore();
/// Redirect To Login
Page.
FormsAuthentication.RedirectToLoginPage();
}