public override void OnActionExecuting(ActionExecutingContext filterContext) { bool bValidar = UtlAuditoria.ValidarSession(); if (bValidar) { filterContext.Result = new RedirectToRouteResult(new RouteValueDictionary(new { controller = "usuario", action = "login" })); } base.OnActionExecuting(filterContext); }
public override void OnActionExecuting(ActionExecutingContext filterContext) { bool bValidar = UtlAuditoria.ValidarSession(); if (bValidar) { filterContext.Result = new JsonResult { Data = new { iTipoResultado = -5, message = "error" }, JsonRequestBehavior = JsonRequestBehavior.DenyGet }; } base.OnActionExecuting(filterContext); }