title: WebAPI ModelBinder Error
body: <p>I've implemented a <code>ModelBinder</code> but it's <code>BindModel()</code> method is not being called, and I get Error Code 500 with the following message:</p>
  
  <p><strong>Error:</strong></p>
  
  <p>Could not
  create a 'IModelBinder' from 'MyModelBinder'. Please ensure it derives
  from 'IModelBinder' and has a public parameterless
  constructor.</p>
  
  <p>I do derive from IModelBinder and do have public parameterless constructor.</p>
  
  <p><strong>My ModelBinder Code:</strong></p>
  
  <pre><code>public class MyModelBinder : IModelBinder
      {
          public MyModelBinder()
          {
  
          }
          public bool BindModel(ModelBindingExecutionContext modelBindingExecutionContext, ModelBindingContext bindingContext)
          {
              // Implementation
          }
      }
  </code></pre>
  
  <p><strong>Added in Global.asax:</strong></p>
  
  <pre><code>protected void Application_Start(object sender, EventArgs e)
  {
      ModelBinders.Binders.DefaultBinder = new MyModelBinder();
  
      // ...
  }
  </code></pre>
  
  <p><strong>WebAPI Action Signature:</strong></p>
  
  <pre><code>    [ActionName("register")]
      public HttpResponseMessage PostRegister([ModelBinder(BinderType = typeof(MyModelBinder))]User user)
      {
          return new HttpResponseMessage(HttpStatusCode.OK);
      }
  </code></pre>
  
  <p><strong>User Class:</strong></p>
  
  <pre><code>public class User
  {
      public List&lt;Communication&gt; Communications { get; set; }
  }
  </code></pre>