title: Executing code before any action
body: <p>I have the following requirement:</p>
  
  <p>On every request to my web page, regardless of which action the user is trying to invoke, I need to call some code that checks if a resource is in place. If it is, then everything is fine and the action method should be called as normal.</p>
  
  <p>However, if this resource is not available, I want all requests to return a separate page asking the user to select another resource from a list of available ones.</p>
  
  <p>So is it possible to have one method run before any action method that have the option of cancelling the call to the action method, and doing something else instead?</p>