问题
QA - I know the answer.
I have created a WCF Data Services OData endpoint and its all works, PowerPivot connects and I built some pivot tables.
Then I implemented a Basic Authentication HTTP handler which challenges requests not presented an Authorization header with a 401 WWW-Authenticate see link:
http://www.asp.net/web-api/overview/security/basic-authentication
This works for IE; the browser pops a credentials input dialogue and IE continues to attach the header with subsequent requests, caches it.
In Excel, I can see that it sends the Authorization header in response to the initial challenge, but it doesn't cache the credentials and send the header on the next request.
Everything is set as per the PowerPivot instructions.
回答1:
You need to append a trailing backslash to the OData endpoint URLs when setting-up the data source/feed in PowerPivot, e.g.
http://localhost:50885/Service.svc/
A bug, but at least with a workaround, and once posted here on SO, a more easily discoverable workaround!
来源:https://stackoverflow.com/questions/27706099/powerpivot-not-sending-authorization-header-in-basic-authentication-to-odata-svc