title: Web API routing 404 not found
body: <p>I'm getting a 404 not found error when trying to access one of my Web API actions:</p>
  
  <p>I have in my WebAPIConfig:</p>
  
  <pre><code>config.Routes.MapHttpRoute(
        name: "DefaultApi",
        routeTemplate: "api/{controller}/{action}/{id}",
        defaults: new { id = RouteParameter.Optional }
  );
  </code></pre>
  
  <p>I have a controller named OnSourceAPIController and a GET action ValidateServiceRequestAuto. </p>
  
  <p>I get a 404 error when I try to go to:</p>
  
  <pre><code>http://localhost/api/OnSourceAPI/ValidateServiceRequestAuto
  </code></pre>
  
  <p>My first guess was I had some kind of routing error, but I created an mvc controller and an index page for it and was able to browse there normally via this routing (api/controller/action). The builtin api/help page even shows /api/OnSourceAPI/ValidateServiceRequestAuto as the route to my api call. </p>
  
  <p>I also tried using the WebAPIRouteDebugger tool. It gives me a 000 404 not found error when I use </p>
  
  <pre><code>http://localhost/api/OnSourceAPI/ValidateServiceRequestAuto
  </code></pre>
  
  <p>, but actually give me the normal route information if I take localhost off of the front and just use</p>
  
  <pre><code>api/OnSourceAPI/ValidateServiceRequestAuto as the URL...
  </code></pre>
  
  <p>Any pointers would be appreciated.</p>