title: MVC and Web API Projects in the same Solution
body: <p>I created a solution a while ago that contains a Web API 2 project (provides JSON data to mobile devices) and a Class Library (includes my data access services).</p>
  
  <p>The Web API project uses Ninject for DI and everything works fine. </p>
  
  <p>Now I need to add a separate MVC project for a few web pages. The api should be accessible from <code>www.example.com/api/controller</code>, while the website should be accessed through <code>www.example.com/controller</code>.</p>
  
  <p>The problem is that each of these two, has a different "Register" method with seemingly incompatible route collections. If I set the MVC project as the startup project, routes for the api are not registered, and vice versa. If I set "Mutiple startup projects", they run on different ports which is not my cup of tea.</p>
  
  <p>How I can set the MVC project as the startup project, while registering all routes for both of them?</p>
  
  <p>One more thing. Because the Web API project was created sooner, Ninject configuration has been written inside it. Of course, some of the services from the Class Library project are needed inside the new MVC project. Do I have to move Ninject configuration to the MVC project, or they just work because they are run on startup of the Web API Project?</p>