如何从 C# 连接到 Azure Analysis Services?

How to Connect to Azure Analysis Services from C#?

我正在学习 Azure Analysis Services,我需要构建一个 C# 应用程序来查询 Azure Analysis Services 上的数据

我很难找到资源,大多数涵盖 SSAS 而不适用于 AAS!

现在最后一次尝试是:

Microsoft.AnalysisServices.Tabular.Server asSrv = new Microsoft.AnalysisServices.Tabular.Server();

asSrv.Connect(@"Password=<password>;Persist Security Info=True;User ID=<email>@hotmail.com;Data Source=asazure://westeurope.asazure.windows.net/<servername>");

例如,这是为了尝试处理数据,但我收到错误消息:

Object reference not set to an instance of an object.

(来源:Microsoft.AnalysisServices.Core)

堆栈跟踪:

at Microsoft.AnalysisServices.HttpStream.ImpersonateLogonIdentityAndExecute(Action action)
   at Microsoft.AnalysisServices.HttpStream.GetResponseStream()
   at Microsoft.AnalysisServices.HttpStream.GetResponseDataType()
   at Microsoft.AnalysisServices.CompressedStream.GetResponseDataType()
   at Microsoft.AnalysisServices.XmlaClient.EndRequest(Boolean useBinaryXml)
   at Microsoft.AnalysisServices.XmlaClient.CreateSession(ListDictionary properties, Boolean sendNamespaceCompatibility, String sessionToken)
   at Microsoft.AnalysisServices.XmlaClient.Connect(ConnectionInfo connectionInfo, Boolean beginSession)
   at Microsoft.AnalysisServices.Core.Server.Connect(String connectionString, String sessionId, ObjectExpansion expansionType)
   at Microsoft.AnalysisServices.Core.Server.Connect(String connectionString)
   at ConnectToAAS.Form1.button4_Click(Object sender, EventArgs e) in D:\Projects\Azure Analysis Services\ConnectToAAS\ConnectToAAS\Form1.cs:line 150

任何人都可以提供 "WORKING" 示例的链接,以了解如何连接和如何查询吗?!

而且我需要静默连接而不弹出登录页面。

提前致谢..

我自己在C:盘搜索了dll,复制到bin目录下引用,成功了!!!

现在的问题是如何在不提示微软账户登录的情况下进行身份验证