0

We are using "Microsoft.AnalysisServices.AdomdClient.retail.amd64" Nuget package for connecting SSAS OLAP in .NET CORE

var environmentConnectionString = @"Provider=MSOLAP;Data Source=ABCD-SQL-XYZ;Initial Catalog=ABCDSALES_OLAP;User ID=xxxx;Password=zzzzz;Persist Security Info=True;Update Isolation Level=2;Impersonation Level=Impersonate";

 using (var conn = new AdomdConnection(environmentConnectionString))
            {
                conn.Open();
                try
                {
                    string output = "";

But, we are getting "A connection cannot be made. Ensure that the server is running." while running "conn.Open()" command.

Thanks in advance for your support

AVG
  • 51
  • 1
  • 7
  • Give this a try instead of putting username and password in the connection string. Not sure if it’s .NET Core compatible but hopefully it gives you a good idea. https://stackoverflow.com/a/33671651/5070440 – GregGalloway Dec 15 '21 at 11:00

1 Answers1

0

You need to change your "conn" type to AdomdConnection and give it a try.

using (AdomdConnection conn = new AdomdConnection(environmentConnectionString))
Faisal Mehboob
  • 609
  • 7
  • 17