title: Issue with Per-Controller configuration in WebApi
body: <p>I am trying to write a custom controller configuration attribute, and the configuration doesn't seem to be taking, the requests are not using our custom contract resolver, here is what our code looks like in the class that implements the IControllerConfiguration.</p>
  
  <pre><code>using System;
  using System.Net.Http.Formatting;
  using System.Web.Http.Controllers;
  
  namespace OurCoolStuff.Api.Common.Attributes
  {
      public class SuperAwesomeCustomConfig: Attribute, IControllerConfiguration
      {
          public void Initialize(HttpControllerSettings controllerSettings, HttpControllerDescriptor controllerDescriptor)
          {
              controllerSettings.Formatters.Clear();
              controllerSettings.Formatters.Add(GetCustomContractResolver());
          }
  
          private MediaTypeFormatter GetCustomContractResolver()
          {
              var formatter = new JsonMediaTypeFormatter
              {
                  SerializerSettings =
                  {
                      ContractResolver = new OurSuperCoolCustomContractResolver()
                  }
              };
              return formatter;
          }
      }
  }
  </code></pre>
  
  <p>Then we just use it very simply like:</p>
  
  <pre><code>[SuperAwesomeCustomConfig]
  TestController : ApiController{
  ...Controller methods here
  }
  </code></pre>
  
  <p>We have tried inserting breakpoints inside of the SuperAwesomeCustomConfig class, and initialize methods, but they never got hit. </p>
  
  <p>Two things to note:
  Our controller methods are returning <code>Task&lt;&gt;</code> with <code>async</code> and we are also using unity for dependency injection.</p>
  
  <p>Our unity code looks like this in UnityConfig.cs</p>
  
  <pre><code>public static void RegisterComponents()
          {
              var container = new UnityContainer();
              GlobalConfiguration.Configuration.DependencyResolver = new UnityDependencyResolver(container);
          }
  </code></pre>
  
  <p>As far as I can tell this is pretty boilerplate.</p>