0
votes

I've recently tried to implement a WebApi service that implements Odata. For my reference I've been using the below links. In my own code and when running the example, making requests via Fiddler will only return 406 errors. Has anyone run into similar problems?

Thanks

WebApi Odata post

WebApi Odata Example

2
Can you post some of your code? Which operations are you getting the 406 error on? - SCB

2 Answers

1
votes

There exist two namespaces and assemblies because the two versions of OData are incompatible, though they can be used side-by-side.

Use System.Web.Http.OData for OData v3 and use System.Web.OData for OData v4. in your odata controller

0
votes

There is a bug tracking this issue. The problem here is that any exception during execution gets converted to a HttpError and the ODataFormatter doesn't understand HttpError right now.