First time here? You are looking at the most recent posts. You may also want to check out older archives or the tag cloud. Please leave a comment, ask a question and consider subscribing to the latest posts via RSS. Thank you for visiting! (hide this)

The first version of my tiny FilterInjector included only the action invoker for ActionFilters.

But ASP.NET MVC has four different filters:

  • Action Filters: executed before and after an Action is executed
  • Result Filters: executed before and after the ActionResult returned by the Action is executed
  • Authorization Filters: executed before an Action is executed, to verify that the current request is authorized
  • Exception Filters: executed when a unhandled exception happens during the execution of the request

Now, thanks to Owen Evans which kindly sent me a patch, the Ninject.FilterInjector can also inject dependencies into all the four kind of filters.

You can download the latest version from my personal Google Code repository, together with a sample ASP.NET MVC website that uses all the aforementioned filters. The instruction to use it in your web applications are outlined in my previous post: Extending Ninject to inject dependencies into Action Filters.

posted on Monday, February 23, 2009 12:31 PM
Comments have been closed on this topic.