Register global filters in ASP.Net MVC 4 and Autofac
问题 I have a filter like this one: public class CustomFilterAttribute : ActionFilterAttribute, IAuthorizationFilter { public MyPropery Property { get; set; } .... } I need it to be run for every actions in my project I tried to register it in the GlobalFilters but my property doesn't get injected I tried This solution to register my filter but it doesn't get called Any idea on how to do that? 回答1: There's a new way of registering MVC global filters in AutoFac. First, remove the filter