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: Sorry I can't provide input on the coding, but this fix should be confirmed against both Excel 2013, and 2010+PowerPivot, as it seems to have a different impact on each. When we expose OData from our Azure site we can consume it in Excel 2013, but with Excel 2010 and PowerPivot we get the error message: "Data at the root level is invalid. Line 1, Position 1".
We should switch our default format for service documents to be XML.
Comments: Sorry I can't provide input on the coding, but this fix should be confirmed against both Excel 2013, and 2010+PowerPivot, as it seems to have a different impact on each. When we expose OData from our Azure site we can consume it in Excel 2013, but with Excel 2010 and PowerPivot we get the error message: "Data at the root level is invalid. Line 1, Position 1".