We should return json verbose payload when old client requests for json. This is the same behavior as WCF DS.
Currently, we always returns json light payload and fails when MaxODataServiceVersion is lower than 3.0.
The fix is to make CanWriteType smarter about DataServiceVersion, or won't fix it as we are only V3.0 service.
Comments: We are seeing a similar issue, except that we just get a generic error message. This request was issued by Pebble Reports. The problem goes away if I issue the same request from Fiddler, without the MaxDataServiceVersion header. Request: GET https://odata.mysite.com/odata/resource HTTP/1.1 User-Agent: Microsoft ADO.NET Data Services MaxDataServiceVersion: 2.0;NetFx SL-User-Agent: OData Reporting Accept: application/atom+xml,application/xml Accept-Charset: UTF-8 Response: <?xml version="1.0" encoding="utf-8"?> <m:error xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"> <m:code /> <m:message xml:lang="en-US">An error has occurred.</m:message> </m:error>
Currently, we always returns json light payload and fails when MaxODataServiceVersion is lower than 3.0.
The fix is to make CanWriteType smarter about DataServiceVersion, or won't fix it as we are only V3.0 service.
Comments: We are seeing a similar issue, except that we just get a generic error message. This request was issued by Pebble Reports. The problem goes away if I issue the same request from Fiddler, without the MaxDataServiceVersion header. Request: GET https://odata.mysite.com/odata/resource HTTP/1.1 User-Agent: Microsoft ADO.NET Data Services MaxDataServiceVersion: 2.0;NetFx SL-User-Agent: OData Reporting Accept: application/atom+xml,application/xml Accept-Charset: UTF-8 Response: <?xml version="1.0" encoding="utf-8"?> <m:error xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"> <m:code /> <m:message xml:lang="en-US">An error has occurred.</m:message> </m:error>