public override void OnAuthorization(AuthorizationContext filterContext) { HttpSessionStateBase Session = filterContext.HttpContext.Session; int sessionUserId = Session.UserId(); if (sessionUserId != -1 && sessionUserId != 0) { filterContext.Result = new RedirectToRouteResult( new RouteValueDictionary { { "controller", "Bootstrap" }, { "action", "Index" } }); } //int sessionLoginId = Session.LoginId(); //if (sessionLoginId != -1 && sessionLoginId != 0) //{ // filterContext.Result = new RedirectToRouteResult( // new RouteValueDictionary{{ "controller", "Bootstrap" }, // {"action","Index"} // }); //} }