title: Setup of WebApiConfig.cs -
body: <p>I have the following in my WebApiConfig.cs file:</p>
  
  <pre><code>// Web API routes
  config.MapHttpAttributeRoutes();
  config.Routes.MapHttpRoute(
              name: "UserLogin",
              routeTemplate: "api/{controller}/{UserInitials}/{UserPin}",
              defaults: new { id = RouteParameter.Optional }
              );
  
   config.Routes.MapHttpRoute(
                name: "BinQuery",
                routeTemplate: "api/{controller}/{UserID}/{UserCode}/{BinCode}",
                defaults: new { id = RouteParameter.Optional }
                );
  
  //This one below does not work as one above is always taken first!!
  config.Routes.MapHttpRoute(
               name: "BarcodeQuery",
               routeTemplate: "api/{controller}/{UserID}/{UserCode}/{BarCode}",
               defaults: new { id = RouteParameter.Optional }
               );
  </code></pre>
  
  <p>I would like to be able specify by the URL called which controller to use, at the moment, because the last entry has three parameters it never get chosen, the middle one does.</p>
  
  <p>For example, I would like the following URLs to call controllers I specify:</p>
  
  <pre><code>http://myserver/api/UserLogin/AS/1234
  http://myserver/api/BinQuery/AS/1234/ABC123
  http://myserver/api/BarcodeQuery/AS/1234/3424532543
  </code></pre>
  
  <p>Hope this is somewhat clear what I am trying to achieve.</p>