Excel expects an XML service doc, but it doesn't send any Accept header. By default ASP.NET Web API OData sends back a JSON service doc when no Accept header is specified. As a result you cannot consume a default ASP.NET Web API OData service using Excel.
We should switch our default format for service documents to be XML.
Comments: Hi, is this solution really working? I'm installed the latest Microsoft.AspNet.WebApi.OData nuget wiht the following nuget command: Install-Package Microsoft.AspNet.WebApi.OData -IncludePrerelease But we still can't get our Odata to work in excel. And if i run it in notepad or a webbrowser the response is JSON and not XML. Is there any way to see if i'm using the correct version of ODataMediaTypeFormatters.cs? Regards, Tommy
We should switch our default format for service documents to be XML.
Comments: Hi, is this solution really working? I'm installed the latest Microsoft.AspNet.WebApi.OData nuget wiht the following nuget command: Install-Package Microsoft.AspNet.WebApi.OData -IncludePrerelease But we still can't get our Odata to work in excel. And if i run it in notepad or a webbrowser the response is JSON and not XML. Is there any way to see if i'm using the correct version of ODataMediaTypeFormatters.cs? Regards, Tommy