Call OData to return 406 not acceptable solution

Source: Internet
Author: User

Call OData to return 406 not acceptable solution

When using OData in a Web API project, always return 406 not acceptable


Under
Http://stackoverflow.com/questions/26676879/webapi-and-odatacontroller-return-406-not-available
And
http://stackoverflow.com/questions/26676879/webapi-and-odatacontroller-return-406-not-available/27191598#27191598


Get the solution:
In the controller's code, the using System.Web.Http.OData is changed to the using System.Web.OData;

Other about the use of OData in. NET:


Odata query:
http://www.odata.org/documentation/odata-version-2-0/uri-conventions/
http://www.odata.org/libraries/
http://www.nuget.org/packages/Microsoft.AspNet.OData/
Http://www.asp.net/web-api/overview/odata-support-in-aspnet-web-api/odata-v4/create-an-odata-v4-endpoint
Https://msdn.microsoft.com/en-us/library/ff478141.aspx
Http://jerther.blogspot.ca/2014/11/aspnet-web-api-2-help-pages-odata_28.html
http://www.codeproject.com/script/Articles/ArticleVersion.aspx?aid=634772&av=928984

Call OData to return 406 not acceptable solution

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.