SSDT Microsoft.AnalysisServices.Server connect throwing "Value cannot be null error"

562 Views Asked by At

I am trying to connect OLAP cube server from SSIS using script task(C# .net). I am getting following error

"Value cannot be null".

I am using the SSDT 2017.

The same was working from BIDS 2008. But not working on the SSDT 2017.

Microsoft.AnalysisServices.Server server = new Microsoft.AnalysisServices.Server();
server.Connect("localhost");

Error Message : Value cannot be null. Inner Exception : null

1

There are 1 best solutions below

2
Hadi On

Try replacing localhost with the DataSource=localhost.

Example:

Microsoft.AnalysisServices.Server server = new Microsoft.AnalysisServices.Server();
server.Connect(@"DataSource=localhost");

References


I suggest refering to te following article for a step by step guide to connect to SSAS multidimensional database from Script Task: