public override void OnActionExecuting(ActionExecutingContext filterContext) { base.OnActionExecuting(filterContext); if (SessionHelper1.ExistUserInSession()) { filterContext.Result = new RedirectToRouteResult(new RouteValueDictionary(new { controller = "Home", action = "Index" })); } }
public ActionResult Logout() { SessionHelper1.DestroyUserSession(); return(Redirect("~/Login")); }