Powerpivot Odata Feed提供凭据

时间:2016-04-25 08:35:37

标签: c# excel wcf odata excel-2013

我创建了一个托管在安全服务器中的OData Web服务,以访问这些服务,用户需要提供凭据,然后使用cookie进行身份验证(TMG Fore Front Server Forms)

如何向Table Import Wizard>提供凭据? Connect to a Data Feed

当我进入svc并测试连接时,我得到401.

更新

安静奇怪,但是如果在将url放入其中后点击了按钮就给了我401,但是现在我再次尝试启动,而不是添加url,点击提前按钮,这就是我现在能看到的,

enter image description here

现在,如果我添加密码和用户ID,我会收到此错误,

============================
Error Message:
============================

The remote server returned an error: (401) Unauthorized.

============================
Call Stack:
============================

   at System.Net.HttpWebRequest.GetResponse()
   at Microsoft.AnalysisServices.Common.DataSourceBasic.UpdateDataFeedParametersInternal(ConnectionStringBuilder connBuilder, IDataSource dataSource, Boolean checkFeedValid, Boolean fKeepAlive)
   at Microsoft.AnalysisServices.Common.DataSourceBasic.UpdateDataFeedParameters(ConnectionStringBuilder connBuilder, IDataSource dataSource, Boolean checkFeedValid)
   at Microsoft.AnalysisServices.Common.DataSourceBasic.GetCurrentConnectionString(Boolean checkFeedValid)
   at Microsoft.AnalysisServices.Common.DataSourceBasic.ClickTestConnection(Object progressControl)

1 个答案:

答案 0 :(得分:1)

since I happen to know this is a sharepoint based solution you have been working on I think this should be relevant ...

https://msdn.microsoft.com/en-us/library/ee210671(v=sql.120).aspx

... and for power pivot add on in excel ...

https://support.office.com/en-gb/article/Connect-to-an-OData-feed-Power-Query-4441a94d-9392-488a-a6a9-739b6d2ad500

... clicking on the option "from odata feed" in that menu gives you options to build a query, you can also specify the credentials.

Setting up the query gives you the ability to do this ...

https://blog.crossjoin.co.uk/2014/03/26/working-with-web-services-in-power-query/