Top "Action-filter" questions

In ASP.

How to pass parameters to a custom ActionFilter in ASP.NET MVC 2?

I'm trying to create a custom ActionFilter which operates on a set of parameters that would be passed to it …

c# asp.net asp.net-mvc action-filter
Redirecting to specified controller and action in asp.net mvc action filter

I have written an action filter which detects a new session and attempts to redirect the user to a page …

asp.net-mvc redirect action-filter
Why is my ASP.NET Web API ActionFilterAttribute OnActionExecuting not firing?

I'm trying to implement what's seen here: http://www.piotrwalat.net/nhibernate-session-management-in-asp-net-web-api/ but I'm having an issue with my NhSessionManagementAttribute. …

c# asp.net-web-api action-filter actionfilterattribute
In what order are filters executed in asp.net mvc

In MVC we can decorate action methods with different filters like [HttpPost] [Authorize] public ActionResult mymethod(){} HttpPost derives from MethodSelectorAttribute (…

asp.net-mvc asp.net-mvc-3 filter action-filter
What is the difference between attributes and filters in MVC

Now can I please get a comparison not just a definition. Example: SomeClassAttribute (or ISomeClassAttribute) VS SomeClassFilter (or ISomeClassFilter) I …

c# asp.net-mvc asp.net-mvc-4 asp.net-web-api action-filter
Get User Name on Action Filter

I use MVC4 web application with Web API. I want to create an action filter, and I want to know …

c# asp.net-web-api action-filter
How to skip action execution from an ActionFilter?

Is it possible to skip the whole action method execution and return a specific ActionResult when a certain condition is …

asp.net-mvc action-filter
Order of execution with multiple filters in web api

I am using latest web api. I do annotate some controllers with 3 different filter attributes. 1 [Authorize] 2 [RessourceOwnerAttribute derived from AuthorizationFilterAttribute] 3 […

c# asp.net asp.net-web-api action-filter asp.net-web-api2
Best place to set CurrentCulture for multilingual ASP.NET MVC web applications

For multilingual ASP.NET MVC 3 web application, I am determining the Thread.CurrentThread.CurrentCulture and Thread.CurrentThread.CurrentUICulture on the …

asp.net-mvc asp.net-mvc-3 action-filter controller-factory
Get ActionName, ControllerName and AreaName and pass it in ActionFilter Attribute

I use a custom AuthorizationFilter like the followings: public class ActionAuthorizeAttribute : AuthorizeAttribute { protected override bool AuthorizeCore(System.Web.HttpContextBase httpContext) { …

asp.net-mvc asp.net-mvc-3 authorization action-filter authorize-attribute