title: MVC Controller not being reached in Web API Project
body: <p>I have a Web Api project which needs to return an MVC styled View. I have made my MVC Controller as such</p>
  
  <pre><code>public class MVCController: Controller
  {
      [HttpGet]
      [Route("api/mvc/test")]
      public ActionResult test()
      {
          return View();
      }
  }
  </code></pre>
  
  <p>However, When i try to access this controller from the web, i cant seem to reach the controller. I get the following error:</p>
  
  <p>{"Message":"No HTTP resource was found that matches the request URI '<a href="http://localhost/foo/api/mvc/test" rel="nofollow">http://localhost/foo/api/mvc/test</a>'.","MessageDetail":"No type was found that matches the controller named 'mvc'."}</p>
  
  <p>After doing searches on google, people seem to be telling me to change routing properties in the webapiconfig to </p>
  
  <pre><code>   config.Routes.MapHttpRoute(
              name: "DefaultApi",
              routeTemplate: "api/{controller}/{id}",
              defaults: new { id = RouteParameter.Optional }
  </code></pre>
  
  <p>But i still seem to be having no luck. IF HOWEVER i change my controller to an webapi controller as such</p>
  
  <pre><code>public class MVCController: ApiController
  {
      [HttpGet]
      [Route("api/mvc/test")]
      public IHttpActionResult test()
      {
          return Ok();
      }
  }
  </code></pre>
  
  <p>I can reach the controller.. If someone could give me some insight to as what is going on, it would be much appreciated.</p>
  
  <p><strong>UPDATE</strong> 
  After reading the response below, I have updated my controller to look like this:</p>
  
  <pre><code>public class MVCController: Controller
  {
      [HttpGet]
      public ActionResult test()
      {
          return View();
      }
  }
  </code></pre>
  
  <p>However, localhost/MVCController/test still seems to give me a 404 error and the Controller is not being hit. Sorry for my newbieness by the way.</p>