DefaultFilterProvider

If you need to apply a FilterAttribute to all your MVC controllers and actions, but still be able to override the default behaviour, then you can use the following:
FilterProviders.Providers.Add(new DefaultFilterProvider<NoAuthorizeAttribute, AuthorizeUserAttribute>());

Comments

Popular Posts