title: Web.API MapHttpRoute parameters
body: <p>I'm having problems with my Web.API routing.  I have the following two routes:</p>
  
  <pre class="lang-cs prettyprint-override"><code>config.Routes.MapHttpRoute(
      name: "MethodOne",
      routeTemplate: "api/{controller}/{action}/{id}/{type}",
      defaults: new { id = RouteParameter.Optional, type = RouteParameter.Optional }
  );
  
  config.Routes.MapHttpRoute(
      name: "MethodTwo",
      routeTemplate: "api/{controller}/{action}/{directory}/{report}",
      defaults: new { directory = RouteParameter.Optional, report = RouteParameter.Optional }
  );
  </code></pre>
  
  <p>And in my controller these two methods:</p>
  
  <pre class="lang-cs prettyprint-override"><code>[HttpGet]
  [ActionName("methodone")]
  public string MethodOne(string id, string type)
  {
      return string.Empty;
  }
  
  [HttpGet]
  [ActionName("methodtwo")]
  public string MethodTwo(string directory, string report)
  {
      return string.Empty;
  }
  </code></pre>
  
  <p>These two seemingly cannot live side by side. If I comment out the MethodOne route in WebApiConfig, the MethodTwo route works. Commenting MethodTwo route allows MethodOne to work. Leaving both uncommented, MethodOne works, but not MethodTwo.</p>
  
  <p>I was hoping to use one route for both of these then it seems they would have to have the same parameter names. Who writes methods with generic parameter names? Bad. I really don't want my methods to have the same parameter names (like p1, p2, p3), so I thought I could create a route just for the new method. But even this doesn't seem to work.</p>
  
  <p>I really miss the <code>WebGet(UriTemplate="")</code> from WCF rest.</p>
  
  <p>I have one controller that has many methods, some with 1, 2, 3 or even more parameters. I can't believe I cant use meaningful parameter names with the MapHttpRoute approach.</p>
  
  <p>I could comment that stuff out entirely and use <code>WebGet()</code> … but before I got there I wanted to see if I'm missing something.</p>