MdxDataSource and SSAS over HTTP

Posted by: vik-pca on 3 August 2017, 3:51 pm EST

  • Posted 3 August 2017, 3:51 pm EST

    I tried to create a connection using the MdxDataSource to an SSAS database across HTTP, but it did not seem to want to work.  I used the following code (or close to it):

    MdxDataSource mdxDataSource = new MdxDataSource();
    mdxDataSource.ConnectionString = "Provider=olap;Data Source=http://localhost/Olap.asmx;Initial Catalog=DatabaseName;";
    mdxDataSource.Perspective = "CubeName";
    mdxDataSource.Connect();


    This code always fails with the following error message and stacktrace:

    Failed to open connection to data source. Ensure server is running.  Connection string was: 'Provider=olap;Data Source=http://localhost/Olap.asmx;Initial Catalog=DatabaseName;'
       at DataDynamics.Analysis.Core.Data.PivotDataProvider.EnsureConnected()
       at DataDynamics.Analysis.Core.Data.PivotDataProvider.#lld(String connectionString, String perspective)
       at DataDynamics.Analysis.DataSources.MdxDataSource.ConnectImpl()
       at DataDynamics.Analysis.DataSources.DataSourceBase.Connect()
       at PaCubeDemo.Client.frmMain..ctor() in X:\dev\PaCubeDemo\PaCubeDemo.Client\frmMain.cs:line 27
       at PaCubeDemo.Client.Program.Main() in X:\dev\PaCubeDemo\PaCubeDemo.Client\Program.cs:line 17
       at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
       at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
       at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()


    Looking at the inner exception, I see that it says:

    Unsupported data format : text/xml; charset=utf-8
       at Microsoft.AnalysisServices.AdomdClient.HttpStream.GetResponseDataType()
       at Microsoft.AnalysisServices.AdomdClient.CompressedStream.GetResponseDataType()
       at Microsoft.AnalysisServices.AdomdClient.XmlaClient.EndRequest()
       at Microsoft.AnalysisServices.AdomdClient.XmlaClient.SendMessage(Boolean endReceivalIfException, Boolean readSession, Boolean readNamespaceCompatibility)
       at Microsoft.AnalysisServices.AdomdClient.XmlaClient.Discover(String requestType, String requestNamespace, ListDictionary properties, IDictionary restrictions, Boolean sendNamespacesCompatibility)
       at Microsoft.AnalysisServices.AdomdClient.XmlaClient.Discover(String requestType, ListDictionary properties, IDictionary restrictions, Boolean sendNamespacesCompatibility)
       at Microsoft.AnalysisServices.AdomdClient.AdomdConnection.XmlaClientProvider.Microsoft.AnalysisServices.AdomdClient.AdomdConnection.IXmlaClientProviderEx.Discover(String requestType, IDictionary restrictions, InlineErrorHandlingType inlineErrorHandling, Boolean sendNamespaceCompatibility)
       at Microsoft.AnalysisServices.AdomdClient.AdomdConnection.ReadDataSourceInfo()
       at Microsoft.AnalysisServices.AdomdClient.AdomdConnection.ConnectToXMLA(Boolean createSession, Boolean isHTTP)
       at Microsoft.AnalysisServices.AdomdClient.AdomdConnection.Open()
       at DataDynamics.Analysis.DataProvider.Microsoft.AnalysisServices.MdxDataProvider.Connect()
       at #FZc.#Whe.Connect()
       at DataDynamics.Analysis.Core.Data.PivotDataProvider.EnsureConnected()


    So, it would seem that AdomdClient does not like the text/xml format...  But when I make my own Adomd connection (using ADOMD.NET), I have no problem.  The code for that looks like (using Microsoft.AnalysisServices.Adomd.dll):

    AdomdConnection connection = new AdomdConnection("Provider=olap;Data Source=http://localhost/Olap.asmx;Initial Catalog=DatabaseName;");
    connection.Open();


    This has no problems working.  So, I am wondering what version of the ADOMD.NET library your control is using, and if you have any idea how I could get around this issue.  If I cannot get SSAS over HTTP to work, I cannot use your control, and have no reason to purchase it for my project.  I do know that my HTTP connection to SSAS works with ADOMD.NET using the code above, and also works inside of Excel, as well as using DevExpress pivot grid (which we are evaluating as well).

    To sum up, I can use an HTTP connection string with ADOMD.NET, and create a working connection.  When using your MdxDataSource class, an error is thrown saying that the text/xml data format is not supported, and it seems to be coming from AdomdClient, which is what I use (version 10 I believe).

    Thank you for your help.
  • Replied 3 August 2017, 3:51 pm EST

    Hello,



    I have been able to replicate the said situation and entered this as Case 125721 in our system. I have added your email address to the list of affected users for this case.



    You may subscribe to our announcements forum to get latest update on release:

    http://www.datadynamics.com/forums/81/ShowForum.aspx



    Do let us know if you require further assistance/clarifications.



    Best Regards,

    Amit
  • Replied 3 August 2017, 3:51 pm EST

    has there been any resolution for this?
  • Replied 3 August 2017, 3:51 pm EST

    chubert,

    This case is marked as fixed. You can download the latest build here:
    http://downloads.datadynamics.com/dda-1.0.921.0.zip

    Thank you,
    Andrey T.


Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels