ASP.NET Web API

Announcement: This forum has been replaced by Visual Studio Developer Community to provide you one convenient and responsive system for all feedback. You can now suggest new ideas, browse and vote on existing ideas in the Visual Studio Developer Community.

We’d like your suggestions and ideas to help us continuously improve future releases of ASP.NET, so we’ve partnered with UserVoice, a third-party service, to collect your feedback. Please do not send any novel or patentable ideas, copyrighted materials, samples or demos for which you do not want to grant a license to Microsoft.

This site is for feature suggestions; if you need to file a bug, you can visit our Developer Community website to get started.

Note: your use of the portal and your submission is subject to the UserVoice Terms of Service & Privacy Policy and license terms.

We look forward to hearing from you!
- The ASP.NET Team

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.

  • Hot ideas
  • Top ideas
  • New ideas
  • My feedback
  1. Support for stream binding and simplify upload case

    Provide ability for binding to Stream property. It would be nice if I could create upload as easy as it is in MVC. Please provide out of the box suport for binding multipart/form-data or octet-stream to class with stream property.
    It would be also nice If I could bind field with base64 string to stream property.

    13 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: facebook google
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    0 comments  ·  ASP.NET Web API  ·  Flag idea as inappropriate…  ·  Admin →
    completed  ·  Pranav Rastogi responded

    In ASP.NET 5, MVC and Web API are unified into MVC 6 so you can use the MVC model to bind to stream for Web API scenarios.

  2. Allow customize the formatting of error messages created with Request.CreateErrorResponse()

    Currently Web Api returns error messages, which look like this:

    {
    "message": "Your request is invalid.",
    "modelState":
    {
    "user.UserName": ["The UserName field is required."]
    }
    }

    The parameter prefixes ("user." in this case) makes it more cumbersome to consume on the client side. Field names in the error message should match exactly field names in the original request. Also "modelState" doesn't make much sense here because there is just a list of error messages, nothing more. By default, this response should look like this instead:

    {
    "message": "Your request is invalid.",
    "errors":
    {
    "userName": ["The UserName field is required."]
    } …

    4 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: facebook google
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    0 comments  ·  ASP.NET Web API  ·  Flag idea as inappropriate…  ·  Admin →
    completed  ·  Daniel Roth responded

    The CreateErrorResponse extension method is just a simple convenience method that provides a default formatting for sending back error information (based on the HttpError class). You can provide whatever error format you’d like by constructing your own HttpResponseMessage or IHttpActionResult.

  3. Can I just return a Content(string) from Asp.NET Web API?

    Don't even need razor I'll just create the HTML via string builder.

    3 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: facebook google
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    1 comment  ·  ASP.NET Web API  ·  Flag idea as inappropriate…  ·  Admin →
    completed  ·  Daniel Roth responded

    Absolutely! You can just return an HttpResponseMessage with a StringContent. When HTML be sure to set the right content type header for the response.

  4. Allow the return type for Help samples to be specified by an Attribute

    Note that this request is about the default HelpPage code that is added through Nuget, I can fix the code myself, but i'd love to see it baked into the default code (HelpPageSampleGenerator.cs):

    The way the Help samples are created based off the return type of the action is cool: If i return a Person then a Person is created with some nice sample values. But most of the time, my actions return an HttpResponse, because I need to control the headers/status codes. This is obviously considered in HelpPageSampleGenerator, there is a comment:

    // Do the sample generation based on…

    3 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: facebook google
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    0 comments  ·  ASP.NET Web API  ·  Flag idea as inappropriate…  ·  Admin →
  5. Out of the box CORS support in ASP.NET Web API

    Enable CORS as a feature of ASP.NET Web API. See http://enable-cors.org/ for more details on this feature.

    2 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: facebook google
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    0 comments  ·  ASP.NET Web API  ·  Flag idea as inappropriate…  ·  Admin →

ASP.NET Web API

Feedback and Knowledge Base