title: Why doesn't this Web Api route work?
body: <p>I declared these routes and controllers:</p>
  
  <pre><code>public class RouteConfig
  {
      public static readonly string MVC_ROUTING = "Default";
      public static readonly string WEB_API_ROUTING = "Api";
  
      public static void RegisterRoutes(RouteCollection routes)
      {
          routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
          routes.MapRoute(
            name: MVC_ROUTING,
            url: "{controller}/{action}/{id}",
            defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional },
            constraints: new { id = @"^[0-9]*$" }
        );
  
        routes.MapRoute(
            name: WEB_API_ROUTING,
            url: "api/{controller}/{action}/{id}",
            defaults: new {id = UrlParameter.Optional },
            constraints: new { id = @"^[0-9]*$" }
        );
      }
  }
  
  public class QuoteController : ApiController
  {
      private readonly QuoteService quoteService;
      public QuoteController()
      {
          quoteService = new QuoteService();
      }
  
      // GET api/&lt;controller&gt;
      public IEnumerable&lt;QuoteModel&gt; Get()
      {
          return quoteService.GetAllQuotes().Map&lt;QuoteModel&gt;();
      }
  
      // GET api/&lt;controller&gt;/5
      public QuoteModel Get(int id)
      {
          return quoteService.GetQuoteById(id).Map&lt;QuoteModel&gt;();
      }
  
      // POST api/&lt;controller&gt;
      public HttpResponseMessage Post(QuoteModel quoteModel)
      {
          Quote quote = quoteModel.Map&lt;Quote&gt;();
          quoteService.AddNewQuote(quote);
  
          string uri = Url.Link(RouteConfig.WEB_API_ROUTING, new { id = quote.QuoteId,controller="Quote",action="Get"});
          return Request.CreateResponse(HttpStatusCode.OK, uri);
      }
  
      // PUT api/&lt;controller&gt;/5
      public void Put(QuoteModel quote)
      {
          quoteService.Update(quote.Map&lt;Quote&gt;());
      }
  
      // DELETE api/&lt;controller&gt;/5
      public void Delete(int id)
      {
          quoteService.DeleteQuote(id);
      }
  }
  </code></pre>
  
  <p>I don't understand why these routes work:</p>
  
  <ul>
  <li><a href="http://localhost:57721/api/quote/25" rel="nofollow noreferrer">http://localhost:57721/api/quote/25</a></li>
  <li><a href="http://localhost:57721/api/quote/get?id=25" rel="nofollow noreferrer">http://localhost:57721/api/quote/get?id=25</a></li>
  </ul>
  
  <p>But this one doesn't:</p>
  
  <ul>
  <li><a href="http://localhost:57721/api/quote/get/25" rel="nofollow noreferrer">http://localhost:57721/api/quote/get/25</a></li>
  </ul>