AddingFiltersWithoutSupertype.Controllers.AccountController.OnActionExecuting C# (CSharp) Method

OnActionExecuting() protected method

protected OnActionExecuting ( ActionExecutingContext filterContext ) : void
filterContext ActionExecutingContext
return void
        protected override void OnActionExecuting(ActionExecutingContext filterContext)
        {
            if (filterContext.HttpContext.User.Identity is WindowsIdentity)
            {
                throw new InvalidOperationException("Windows authentication is not supported.");
            }
        }