调用odata返回406 not acceptable解决方案

调用odata返回406 not acceptable解决方案

 

在web api项目中使用odata时,总是返回406 not acceptable


根据
http://*.com/questions/26676879/webapi-and-odatacontroller-return-406-not-available

http://*.com/questions/26676879/webapi-and-odatacontroller-return-406-not-available/27191598#27191598


得到解决方案:
在Controller的代码中,把using System.Web.Http.OData;改成using System.Web.OData;

 

其他关于odata在.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

上一篇:压测2.0:云压测 + APM = 端到端压测解决方案


下一篇:荣获“5G MEC优秀商用案例奖”,阿里云边缘计算发力新零售