Configurable Global Action Filters for ASP.NET MVC

Posted by: K. Scott Allen, on 18 Jan 2011 | View original | Bookmarked: 0 time(s)

ASP.NET MVC 3.0 introduces global action filters - an easy way to apply an action filter to every action in an MVC application. All you need to do is register the filters during application startup: protected void Application_Start() { ... GlobalFilters.Filters.Add(new HandleErrorAttribute()); GlobalFilters.Filters.Add(new FooFilter()); GlobalFilters.Filters.Add(new BarFilter()); ... } But what if you wanted to add (or remove) filters through configuration? <configSections> ...

Category: Data | Other Posts: View all posts by this blogger | Report as irrelevant | View bloggers stats | Views: 1053 | Hits: 41

Similar Posts

  • Using T4MVC strongly-typed helpers with Telerik Extensions for ASP.NET MVC more
  • How to use Ninject 2 with ASP.NET MVC more
  • The ASP.NET MVC ActionController The controllerless action, or actionless controller more
  • ViewModel with MVC/Navigation in Silverlight more
  • You should NOT use ASP.NET MVC if. . . more
  • How to improve the performances of ASP.NET MVC web applications more
  • 13 ASP.NET MVC extensibility points you have to know more
  • New class: ASP.NET MVC Boot Camp developer training more
  • jQuery Delete Link With Downlevel Support more
  • Handling Formats Based On Url Extension more

News Categories

.NET | Agile | Ajax | Architecture | ASP.NET | BizTalk | C# | Certification | Data | DataGrid | DataSet | Debugger | DotNetNuke | Events | GridView | IIS | Indigo | JavaScript | Mobile | Mono | Patterns and Practices | Performance | Podcast | Refactor | Regex | Security | Sharepoint | Silverlight | Smart Client Applications | Software | SQL | VB.NET | Visual Studio | W3 | WCF | WinFx | WPF | WSE | XAML | XLinq | XML | XSD