public override void OnActionExecuting(ActionExecutingContext filterContext) { var userName = ContextService.GetCookie(AppSetting.CurrentUserNameCookieName); if (string.IsNullOrWhiteSpace(userName)) { // filterContext.Result = // new RedirectToRouteResult( // new RouteValueDictionary( // new // { // Controller = "Home", // action = "login", // returnUrl = // filterContext.HttpContext.User.Request.Url == null // ? "" // : filterContext.HttpContext.Request.Url.AbsoluteUri // })); } base.OnActionExecuting(filterContext); }