title: MVC 4 with WebAPI 2 does not have a default constructor error
body: <p>Hi i am using MVC4 and WebAPI2 and i got <code>does not have a default constructor</code> <strong>error</strong> in <strong>Ninject</strong>(which is a known error on ninject) and i used <strong>NinjectDependencyResolver</strong> custom class and also <strong>WebApiContrib.Ioc.Ninject</strong> nuget to figure out this error. here is my <strong>NinjectWebCommon</strong> below.</p>
  
  <p>I am not sure is it because my project is layered, so the layer is like 
   I have "CompositionRoot" layer, where Ninject are added and i reference this layer to my main web layer. My project is working, but my web api doesn't return the json, Please help me, i cant move forward without getting this fixed , thanks in advance.</p>
  
  <pre class="lang-cs prettyprint-override"><code>public static class NinjectWebCommon {
      private static readonly Bootstrapper bootstrapper = new Bootstrapper();
  
      public static void Start() {
          DynamicModuleUtility.RegisterModule(typeof(OnePerRequestHttpModule));
          DynamicModuleUtility.RegisterModule(typeof(NinjectHttpModule));
          bootstrapper.Initialize(CreateKernel);
      }
  
      public static void Stop() {
          bootstrapper.ShutDown();
      }
  
      public static IKernel CreateKernel() {
          var kernel = new StandardKernel();
          kernel.Bind&lt;Func&lt;IKernel&gt;&gt;().ToMethod(ctx =&gt; () =&gt; new Bootstrapper().Kernel);
          kernel.Bind&lt;IHttpModule&gt;().To&lt;HttpApplicationInitializationHttpModule&gt;();
  
          RegisterServices(kernel);
          GlobalConfiguration.Configuration.DependencyResolver = 
              new NinjectResolver(kernel);
  
          // I tested using below code as well (NinjectDependencyResolver 
          // is custom class to fix this issue )        
          //GlobalConfiguration.Configuration.DependencyResolver = 
          //    new NinjectDependencyResolver(kernel);
          return kernel;
      }
  
      private static void RegisterServices(IKernel kernel) {
          kernel.Bind&lt;IUserBusiness&gt;().To&lt;UserBusiness&gt;().InRequestScope();
          kernel.Bind&lt;IUserDataAccess&gt;().To&lt;UserDataAccess&gt;().InRequestScope();
      }        
  }
  </code></pre>