title: WebApi Routing issue - unable to route to required action
body: <p>I've used the selected answer from here: <a href="https://stackoverflow.com/questions/12619587/routing-based-on-query-string-parameter-name">Routing based on query string parameter name</a> to build my routes but they don't work as expected:</p>
  
  <p>my route:</p>
  
  <pre><code>config.Routes.MapHttpRoute(
              name: "DefaultApi",
              routeTemplate: "api/{controller}",
              defaults: new { controller = "Products" }
          );
  </code></pre>
  
  <p>my actions:</p>
  
  <pre><code>public string GetProductById(int id) {}
  public string GetProductByIsbn(string isbn) {}
  </code></pre>
  
  <p>I am trying to call these via:</p>
  
  <pre><code>localhost:60819/api/products/id=33 //doesn't work
  localhost:60819/api/products/33 //does work
  </code></pre>
  
  <p>and</p>
  
  <pre><code>http://localhost:60819/api/products/isbn=9781408845240 //doesn't work
  http://localhost:60819/api/products/testString //test with a definite string - doesn't work - still tries to use GetProductById(int id)
  </code></pre>
  
  <p>the error is the same for both that don't work:</p>
  
  <pre><code>&lt;Error&gt;&lt;Message&gt;The request is invalid.&lt;/Message&gt;
      &lt;MessageDetail&gt;
          The parameters dictionary contains a null entry for parameter 'id' of non-nullable type 'System.Int32' for method 'System.String GetProductById(Int32)' in 'BB_WebApi.Controllers.ProductsController'. An optional parameter must be a reference type, a nullable type, or be declared as an optional parameter.
      &lt;/MessageDetail&gt;
  &lt;/Error&gt;
  </code></pre>
  
  <p>Seems to think the id isn't being passed in...?</p>
  
  <p>I've read up all the msdn docs but I seem to be missing something somewhere. Can anyone see where I'm going wrong?</p>