Closed superman-lopez closed 4 years ago
PowerBI and Excel expects OData Complaint payload. Please inherit your controller from ODataController and let us know in case of any issues
Thanks for your message! I have have changed the inheritance of the controller class, and also realised I made a mistake in my routing configuration which didn't trip a http client but did trip Excel.
(I still face some 404 issues, but not related to the error message for which I opened the case)
I have a WebAPI project (my sample project source code is here) where I extended the WebAPI controllers with
EnableQuery
attribute in the same way as Hassan describes in his blogpost. When I query the endpoint with a REST client the API works and provides the OData functionality likeOrderBy
. However when I try to connect to the endpoint with Excel or PowerBI, I get a connection error. I have removed all authentication to rule out issues in authentication.Assemblies affected
Microsoft.AspNetCore.OData
version 7.5.1Reproduce steps
I have deployed my sample project on Azure, the endpoint can be accessed on: https://odatatestdevelopment.azurewebsites.net/api/unauthenticated When I access this with a http client (browser or REST client) the API works as expected. When I access it in Excel, the URL is not recognised as a OData feed.
Expected result
Excel to be able to access the endpoint.
Actual result
Error from Excel:
Additional detail
Some excerpts of my code: