连接到SSAS时,解析WS-Trust响应失败

时间:2017-08-16 09:58:44

标签: c# asp.net azure ssas azure-analysis-services

我正在尝试在小型Web应用程序中连接到Azure Analysis Services。我在Server as_svr = new Server(); String as_conn_str = "Provider=MSOLAP;Data Source=<Server Name>;Integrated Security=SSPI;Persist Security Info=True;"; as_svr.Connect(as_conn_str); 中提出的代码是:

parsing_wstrust_response_failed: Parsing WS-Trust response failed

使用我的Windows凭据。

不幸的是我一直在:

    [AdalException: parsing_wstrust_response_failed: Parsing WS-Trust response failed]
   Microsoft.IdentityModel.Clients.ActiveDirectory.AuthenticationContext.RunAsyncTask(Task`1 task) +89
   Microsoft.IdentityModel.Clients.ActiveDirectory.AuthenticationContext.AcquireToken(String resource, String clientId, UserCredential userCredential) +29

[TargetInvocationException: Exception has been thrown by the target of an invocation.]
   System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) +0
   System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) +160
   System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +101
   Microsoft.AnalysisServices.AadAuthenticator.AcquireToken(Uri dataSourceUri, String dataSource, String identityProvider, String tenantId, String userId, String password, UseAdalCacheType useAdalCache) +970
   Microsoft.AnalysisServices.XmlaClient.OpenHttpConnection(ConnectionInfo connectionInfo, Boolean& isSessionTokenNeeded) +1120
   Microsoft.AnalysisServices.XmlaClient.OpenConnection(ConnectionInfo connectionInfo, Boolean& isSessionTokenNeeded) +405
   Microsoft.AnalysisServices.XmlaClient.Connect(ConnectionInfo connectionInfo, Boolean beginSession) +896
   Microsoft.AnalysisServices.Core.Server.Connect(String connectionString, String sessionId, ObjectExpansion expansionType) +156
   Microsoft.AnalysisServices.Core.Server.Connect(String connectionString) +13
   WebApplication1._Default.Button1_Click(Object sender, EventArgs e) in C:\Visual Studio 2017\Projects\FormAuthAD\WebApplication1\Default.aspx.cs:28
   System.Web.UI.WebControls.Button.OnClick(EventArgs e) +9720430
   System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +204
   System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +12
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +15
   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +35
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1639

更具体地说:

Server as_svr = new Server();
String as_conn_str = "Provider=MSOLAP;Data Source=<Server Name>;User ID=<UserID>;Password=<Password>;Persist Security Info=True; Impersonation Level=Impersonate;";
as_svr.Connect(as_conn_str);

我也尝试过使用:

{{1}}

并产生相同的错误。它必须连接到某些安全设置,但我没有任何相关领域的经验。

如果有任何帮助,我将不胜感激。 谢谢。

0 个答案:

没有答案