title: asp.net Web Api routing not working
body: <p>Here is my routing configuration:</p>
  
  <pre><code>config.Routes.MapHttpRoute(
      name: "ActionApi",
      routeTemplate: "api/{controller}/{action}/{id}",
      defaults: new { id = RouteParameter.Optional }
  );
  </code></pre>
  
  <p>And, here is my controller:</p>
  
  <pre><code>public class ProductsController : ApiController
  {
      [AcceptVerbs("Get")]
      public object GetProducts()
      {
         // return all products...
      }
  
      [AcceptVerbs("Get")]
      public object Product(string name)
      {
         // return the Product with the given name...
      }
  }
  </code></pre>
  
  <p>When I try <code>api/Products/GetProducts/</code>, it works. <code>api/Products/Product?name=test</code> also works, but <code>api/Products/Product/test</code> does not work. What am I doing wrong?</p>
  
  <p><strong>UPDATE:</strong></p>
  
  <p>Here's what I get when I try <code>api/Products/Product/test</code>:</p>
  
  <pre><code>{
    "Message": "No HTTP resource was found that matches the request URI 'http://localhost:42676/api/Products/Product/test'.",
    "MessageDetail": "No action was found on the controller 'Products' that matches the request."
  }
  </code></pre>