title: One controller gives "This localhost page can’t be found"
body: <p>I have a .Net Core 2 Api. A few controllers (UserController, CarController). If I start the Api I can browser to the UserController and it shows me a list of users, perfect!
  When I browse to the CarController it gives me an error:</p>
  
  <blockquote>
    <p>This localhost page can’t be found No webpage was found for the web
    address: <a href="http://localhost:57880/Car" rel="nofollow noreferrer">http://localhost:57880/Car</a> Search Google for localhost
    57880 Car HTTP ERROR 404</p>
  </blockquote>
  
  <p>Each controller has a route-name. So I changed the route-name of the CarController to "DummyTest". I restarted the API, browse to DummyTest and it works! User still works as normal.
  Why?... I can't seem to figure out why "Car" gives a 404 and the same controller with a different route (DummyTest) works.</p>
  
  <p>I found this on StackOverflow: <a href="https://stackoverflow.com/questions/43468715/asp-net-core-this-localhost-page-can-t-be-found">ASP.NET Core This localhost page can’t be found</a>, but this isn't a fix for me.</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>Here is the code of the controller that gives the 404:</p>
  
  <pre><code>[Route("Car")]
  public class CarController : Controller
  {
      private readonly ICarService _carService;
  
      public CarController(ICarService carService)
      {
          _carService= carService;
      }
  
      [HttpGet]
      public List&lt;Car&gt; Get()
      {
          return _carService.GetCars().ToList();
      }
  }
  </code></pre>
  
  <p>Here is the code of the controller that does work:</p>
  
  <pre><code>[Route("User")]
  public class UserController : Controller
  {
      private readonly IUserService _userService;
  
      public UserController(IUserService userService)
      {
          _userService = userService;
      }
  
      [HttpGet]
      public List&lt;User&gt; Get()
      {
          return _userService.GetUsers().ToList();
      }
  }
  </code></pre>