title: No HTTP resource was found that matches the request URI in Web API
body: <p>I have configured my WebApiConfig like this:</p>
  
  <pre><code>public static void Register(HttpConfiguration config)
  {
      config.Routes.MapHttpRoute(
          name: "DefaultApi",
          routeTemplate: "api/{controller}/{action}/{id}",
          defaults: new { id = RouteParameter.Optional }
      );
  }
  </code></pre>
  
  <p>I have one method which accepts one parameter. The accessing URI is <code>http://localhost:8598/api/WebApi/GetLocationCategory/87</code>.</p>
  
  <p>This gives me an error: <code>No HTTP resource was found that matches the request URI      'http://localhost:8598/api/WebApi/GetLocationCategory/87'</code></p>
  
  <p>Controller:</p>
  
  <pre><code>public IEnumerable&lt;LocationCategory_CLS&gt; GetLocationCategory(int CatID)
  {
      var LocCats = (from lct in entities.tdp_LocationCategories join lc in entities.tdp_LocationMaster on lct.FK_LocationID equals lc.LocationID where lct.IsApproved == 0 &amp;&amp; lct.FK_CategoryID == CatID select new { lc.LocationID, lc.LocationName }).ToList();
      List&lt;LocationCategory_CLS&gt; loc = new List&lt;LocationCategory_CLS&gt;();
  
      foreach (var element in LocCats)
      {
          loc.Add(new LocationCategory_CLS
          {
              LocationID = element.LocationID,
              LocationName = element.LocationName
          });
      }
      return loc;
  }
  </code></pre>