title: OnAuthorization being called multiple times
body: <p>I have a custom filter:</p>
  
  <pre><code>public class SetAuthFilter : IAuthorizationFilter
  {
      public void OnAuthorization(AuthorizationContext filterContext)
      {
          //do something
      }
  }
  </code></pre>
  
  <p>In the <code>Application_Start()</code> under the <code>Global.asax</code>:</p>
  
  <pre><code>GlobalFilters.Filters.Add(new SetAuthFilter());
  </code></pre>
  
  <p>The above codes will be called everytime an action is invoked.</p>
  
  <p>However, in my <code>_Layout.cshtml</code>, I have 2 different "<code>BaseController</code>", something like:</p>
  
  <pre><code>@Html.Action("SomeAction", "Base")
  @Html.Action("SomeAction", "Base2")
  </code></pre>
  
  <p>When I set a break point, it appears that the <code>SetAuthFilter</code> is always being called three times, first before the page was launched, then second time when my break point hits the <code>BaseController</code>, then finally the third time when my break point hits the <code>Base2Controller</code>.</p>
  
  <p>What should I do in order to avoid <code>SetAuthFilter</code> being called multiple times?</p>