Conditionally disable ASP.NET MVC Controller
===

What is the best way to disable ASP.NET MVC controller conditionally?

I want to have an access to the controller actions if some value in web.config is "true" and 404 if it's "false" 

Should I write my own attribute? 