I have a filter that would like to apply to all controllers except for one. So I am trying to write something that looks like this:
public static void RegisterGlobalFilters(GlobalFilterCollection filters)
{
filters.Add(new MySweetAttribute()).Exclude(OneController);
}
Trying to read through Brad's post on the subject is gibberish to me
http://bradwilson.typepad.com/blog/2010/07/service-location-pt4-filters.html
I am assuming it is possible since the library below seems to do it, but I would like to avoid adding a dependency if possible.
http://www.codeproject.com/KB/aspnet/FluentFltrsASPNETMVC3.aspx
Hoping someone has done this already and it is easy to do...
Thanks for any help.
Update
Phil Haack has just posted how to approach this scenario.
http://haacked.com/archive/2011/04/25/conditional-filters.aspx