I have a SQL Server Analysis Services Cube published to a remote windows server, not attached to a domain.
I can use use Excel to connect to it remotely by using the wizard at Data -> Get Data -> From Database -> From Analysis Services, and providing a userName and password of a user created on the server for this purpose. It works fine.
I need to connect to the cube with a web app (C#/Blazor). For testing/development, we need to connect from local website running on developer laptops, and well as a separate web servers (not same box as database server).
Tried the following, and many variations:
AdomdConnection(@"Data Source=<ip_address>; Catalog=<DB_Name>; User Id=<user>; Password=<user pwd>; Cube=<Cube_Name>; Provider=MSOLAP;");
The error message is:
A connection cannot be made. Ensure that the server is running. Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host..
Since it works in Excel, that should mean there are no firewall or user/pwd issues. What am I missing?
Solved this by using System.Data.OleDB instead of AdoMD.