locked
WCF Dataservices and JSON issue? V3 requires different accept header! RRS feed

  • Question

  • When I use the OData Explorer to hit my local WCF Data Services 5.0 (Northwind EF model), all is good using Atom. But if I switch to JSON, I get a NotFound error back, and looking in fiddler, I see "Unsupported media type requested" and "A supported MIME type could not be found that matches the acceptable MIME types for the request. The supported type(s) 'application/atom+xml;type=feed, application/atom+xml, application/json;odata=verbose' do not match any of the acceptable MIME types 'application/json'"

    If I switch the service to use MaxProtocolVersion V2 it works.

    If I change the accept header from application/json  to application/json;odata=verbose it works in fiddler.

    It would appear then that new V3 DataServices cannot serve JSON unless the clients modify their accept header? Sounds a little brutal to me?

    Monday, May 21, 2012 3:18 AM

Answers