Top "Action-filter" questions

In ASP.

Action filter execution order

I have created two classes that implement AuthorizeAttribute. One is used globally, and I set it on the Global.asax.…

asp.net-mvc asp.net-mvc-3 action-filter authorize-attribute
A way to exclude action filters in ASP.NET MVC?

I've run into several cases in ASP.NET MVC where I wanted to apply an action filter on every action …

asp.net-mvc action-filter
Extend AuthorizeAttribute Override AuthorizeCore or OnAuthorization

Using ASP.NET MVC I am creating a custom Authorize attribute to take care of some custom authorization logic. I …

asp.net-mvc asp.net-mvc-3 authorization action-filter
Injecting dependencies into custom Web API action filter attribute with Autofac

I'm trying to resolve the dependencies of my custom AuthorizeAttribute which I use to decorate my API controllers in an …

asp.net-mvc asp.net-web-api dependency-injection autofac action-filter
Using Action Filters on MVC C# using query String

Im using class name RightCheckerAttribute to check user permission in MVC3 application... So the RightCheckerAttribute class is like this... public …

c# asp.net-mvc action-filter actionfilterattribute
Web Api - how to stop the web pipeline directly from an OnActionExecuting Filter

I have a pre-action web api hook that will check ModelState.IsValid. If the ModelState is not valid I do …

asp.net asp.net-web-api action-filter
How do I access the ModelState from an ActionFilter?

I'm building an ActionFilter to reuse some code for a simple spam block - basically what I do is that …

asp.net-mvc action-filter modelstate
Getting the HttpActionExecutedContext Result values

I have created a filter which inherits the System.Web.Http.Filters.ActionFilterAttribute in the asp.net web api and …

asp.net-web-api action-filter
Can one get parameter values used in a method from within an ActionFilter?

Assume I have a controller method like this: [Audit] public JsonNetResult List(int start, int limit, string sort, string dir, …

c# parameters action-filter
How to write an action filter for all controllers

Here is a sample action filter. We know that when we write an action filter then we need to decorate …

asp.net-mvc controller attributes action-filter