ASP.NET Web API

Feedback on ASP.NET Web API

You've used all your votes and won't be able to post a new idea, but you can still search and comment on existing ideas.

There are two ways to get more votes:

  • When an admin closes an idea you've voted on, you'll get your votes back from that idea.
  • You can remove your votes from an open idea you support.
  • To see ideas you have already voted on, select the "My feedback" filter and select "My open ideas".
(thinking…)

Enter your idea and we'll search to see if someone has already suggested it.

If a similar idea already exists, you can support and comment on it.

If it doesn't exist, you can post your idea so others can support it.

Enter your idea and we'll search to see if someone has already suggested it.

  1. Remove Ambient Namespaces From Serialized XML

    Currently the XML serialisers both output namespaces that are not required:

    xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

    I'm not sure about the Data Contract serializer, but it is not difficult to supress these...

    Just pass into the Serialize method an XmlSerializerNamespaces:

    var xmlSerializerNamespaces = new XmlSerializerNamespaces();
    xmlSerializerNamespaces.Add(String.Empty, defaultNamespace);

    var xmlSerializer = new XmlSerializer(objectType);
    xmlSerializer.Serialize(xmlWriter, toBeSerialised, xmlSerializerNamespaces);

    Where defaultNamespace could be set on the GlobalConfiguration.Configuration.Formatters.XmlFormatter or it could be read from the XmlRoot attribute (if present) on the object being serialised.

    34 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…)
      1 comment  ·  Flag idea as inappropriate…  ·  Admin →
      planned  ·  Daniel Roth responded

      We are looking at exposes settings to control this behavior on the XML formatter

    • Support OutputCache on WebAPI calls

      In ASP.NET MVC it easy to cache the output of a call by applying the outputcache attribute. A similar feature for WebAPI would help for cacheable resources.

      171 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…)
        2 comments  ·  Flag idea as inappropriate…  ·  Admin →
      • Impovements in ApiExplorer

        Right now it's impossible to add documentation of the multipart form data parameters and exclude / rename Model Binder arguments.

        55 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…)
          under review  ·  1 comment  ·  Flag idea as inappropriate…  ·  Admin →
        • Please provide a 'how to write unit test for Web Api' including using Task/async ApiControllers'

          The section on learning Web API needs to have a topic around writing unit tests. Web API home pages says it's 'easy to test' but then there are no topics around it. Please add a topic on unit testing

          76 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…)
            3 comments  ·  Flag idea as inappropriate…  ·  Admin →
          • Support Nested Routes

            MVC has areas, which would work nicely for this. My thoughts behind this are that it's nice to package functionality as modules, and areas serve that purpose well in MVC apps. Of course, it would be nice to be able to host nested areas, as well.

            174 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…)
              1 comment  ·  Flag idea as inappropriate…  ·  Admin →
            • 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/

              41 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…)
                under review  ·  1 comment  ·  Flag idea as inappropriate…  ·  Admin →
              • 156 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…)
                  0 comments  ·  Flag idea as inappropriate…  ·  Admin →
                • Use Reflection to Auto Populate the Allow Header

                  Based on the current Route being executed, it should be possible to detect HTTP methods the same route supports and therefore populate the Allow header in the response. e.g. whilst performing a GET on /api/values it should be possible to detect that the route supports both GET and POST (in fact the code I presume already has this list so that it knows which Action to call). The Allow header could then be populated with GET, POST.

                  The icing on the cake would be that the Authorize attribute is still checked so if the caller does not have permission to…

                  16 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…)
                    under review  ·  4 comments  ·  Flag idea as inappropriate…  ·  Admin →
                  ← Previous 1 2 Next →
                  • Don't see your idea?

                  ASP.NET Web API

                  Feedback and Knowledge Base