Top "Actionfilterattribute" questions

ActionFilterAttribute is a hybrid abstract class that implements an Attribute, an IActionFilter, and an IResultFilter.

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
Injecting dependencies into ASP.NET MVC 3 action filters. What's wrong with this approach?

Here's the setup. Say I have some action filter that needs an instance of a service: public interface IMyService { void …

c# asp.net-mvc asp.net-mvc-3 dependency-injection actionfilterattribute
How to disable a global filter in ASP.Net MVC selectively

I have set up a global filter for all my controller actions in which I open and close NHibernate sessions. 95% …

asp.net-mvc actionfilterattribute global-filter
How do I get the current Url from within a FilterAttribute?

I am writing an Authorize filter attribute adn I'm having trouble figuring out how to get the current url as …

asp.net-mvc url authorization action-filter actionfilterattribute
How do I unit test a custom ActionFilter in ASP.Net MVC

So I'm creating a custom ActionFilter that's based mostly on this project http://www.codeproject.com/KB/aspnet/aspnet_mvc_…

asp.net-mvc unit-testing tdd actionfilterattribute
How do I add a parameter to an action filter in asp.net?

I have the following filter attribute, and i can pass an array of strings to the attribute like this [MyAttribute("…

c# asp.net-core asp.net-core-mvc actionfilterattribute custom-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
Custom ASP.NET MVC ActionFilterAttribute - hooks never get called

Hi I`m trying to do something that seems kinda easy, and is documented that way but for some reason …

c# asp.net-mvc actionfilterattribute
Async action filter in MVC 4

I have an action filter that when used in certain specific conditions has to perform a web service call to …

c# asp.net-mvc async-await actionfilterattribute
Autofac attribute injection failing on attributes

I've found a few questions on this, but they tend to point to the exact documentation I'm following... but it's …

c# asp.net-mvc-4 autofac actionfilterattribute