title: ASP.NET Web API and Ninject not working
body: <p>I started a new ASP.NET MVC project and I'm using Ninject as my IOC controller.</p>
  
  <p>As far as regular MVC Controllers goes - everything work fine and binding is done to the controller constructor as expected.</p>
  
  <p>I've added a WEB API to my project and did pretty much the same thing. here is the API constructor:</p>
  
  <pre><code>public class DetailsController : ApiController
  {
      private IClientInfoRetriever _clientInfoRetriever;
  
      public DetailsController(IClientInfoRetriever clientInfoRetriever)
      {
          _clientInfoRetriever = clientInfoRetriever;
      }
  
      .
      .
      .
      // The rest of my methods
  }
  </code></pre>
  
  <p>here is the Ninject binding:</p>
  
  <pre><code>Bind&lt;IClientInfoRetriever&gt;().To&lt;ClientInfoRetriever&gt;();
  </code></pre>
  
  <p>but when I try to access my API (just putting the URL in the browser for a get action) I get the following error: </p>
  
  <p>An error occurred when trying to create a controller of type 'DetailsController'. Make sure that the controller has a parameterless public constructor.</p>
  
  <p>It's expecting to get an empty constructor, but if I give it an empty constructor to use - it won't be initializing the object I need.</p>
  
  <p>What am I doing wrong? does Ninject support web api?</p>
  
  <p>Thanks</p>