Feedback on ASP.NET Web API

Enhance the routing API

While I was working on WebAPIContrib I found several issues with the Routing API. I described it in more detail here: http://pedroreys.com/2012/03/14/asp-net-web-api-routing-needs-a-hug/

37 votes
Vote
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    I agree to the terms of service
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    Pedro ReysPedro Reys shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

    1 comment

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      I agree to the terms of service
      Signed in as (Sign out)
      Submitting...
      • Daniel RothAdminDaniel Roth (Admin, ASP.NET Future Feature Feedback) commented  ·   ·  Flag as inappropriate

        Looking at your blog post I believe you highlight four issues:

        1. Why do you need to specify a route name to generate a link when the MVC UrlHelper.Action(…) method don’t require you to specify one?
        - Looks like the behavior of MVC is to iterate over the routes and pick the first one that happens to work. Is this the desired behavior?
        2. Cannot foreach loop over HttpRouteCollection
        - Fixed!
        3. No way to get the name of a route from the route or the route collection
        - This is really an issue with ASP.NET Routing, although it is aggravated by Web API requiring the route name to generate links.
        4. Creating a Web API UrlHelper should only require the request, not the controller context
        - Fixed! You can create a UrlHelper with just the request.

      Feedback and Knowledge Base