我正在学习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>");


例如,这是尝试处理数据,但出现错误:


  你调用的对象是空的。


(来源: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


任何人都可以提供“工作”示例的链接,以了解如何连接和查询吗?

而且我需要以静默方式连接,而没有弹出式登录页面。

提前致谢..

最佳答案

我用自己的方式在C:驱动器中搜索了dll,将它们复制到bin目录中并引用了它们,并且可以正常工作!!!

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

关于c# - 如何从C#连接到Azure Analysis Services?,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/48611788/

10-10 18:13