title: MVC Action Filters - What Causes the Controller Code to not execute?
body: <p>If I define an Action filter that implements <code>IActionFilter</code> like so:</p>
  
  <pre><code>public class FooAttribute : FilterAttribute, IActionFilter
  {
      public void OnActionExecuted(ActionExecutedContext filterContext)
      { }
  
      public void OnActionExecuting(ActionExecutingContext filterContext)
      {
          filterContext.Result = new ContentResult 
          { 
              Content = "Test", 
              ContentEncoding = Encoding.UTF8, 
              ContentType = "text" 
          };
      }
  }
  </code></pre>
  
  <p>And apply it to the following action method:</p>
  
  <pre><code>[Foo]
  public ActionResult Index()
  {
      return View();
  }
  </code></pre>
  
  <p>When I do this the Index action code does not run and neither does the OnResultExecuted method. Is this because I set the <code>Result</code> property in the <code>OnActionExecuting</code> method? Are there any other things that will cause the normal flow to be interrupted?</p>