//logout action public ActionResult Logout() { if (!LoginSession.ISGuest()) { LoginSession.ClearSession(); } return(RedirectToAction("Login")); }
public IActionResult Logout() { if (!Middleware.CheckUserPermission(PermissionType.None, HttpContext)) { return(RedirectToAction("Login", "User")); } SessionHandler.ClearSession(HttpContext); return(RedirectToAction("Index", "Home")); }
private void loginControl_LoggedIn(object sender, EventArgs e) { string sUser = loginControl.UserName; SessionHandler.ClearSession(); SessionHandler.BeginSession(sUser, Request); var master = Master as SiteMaster; if (master != null) { master.GenerateAuthTicket(Session, sUser); } }