I'm trying to connect to an Analysis Services Server with some C#. The server is using the Microsoft.AnalysisServices.Tabular
Assembly namespace (SSAS Tabular). Here's my code:
using var server = new Server();
server.Connect(myConnectionString);
var db = server.Databases.FindByName("MyAnalysisServer");
...
The code breaks on the second line where it tries to Connect
. The weird thing is, this worked for a good couple of months, but all of a sudden started generating an error. We haven't changed the connection string whatsoever. The Exception User-Unhandled that pops up is:
Microsoft.AnalysisServices.ResponseFormatException: The server sent an unrecognizable response.
Inner Exception
XmlException:", hexadecimalvalue 0x06, is an invalid character.
This exception was originally thrown at this call stack: [External Code]
The connection string is formatted in this way:
Provider=MSOLAP;datasource=powerbi://api.powerbi.com/v1.0/myFunctions/My Function;initial catalog=MyAnalysisServer;User ID=app:12345678-eee-0000-0000-123456789012@12345678-1234-5678-1234-123456789012;Password=qwertyui~12345678
I'm really not sure what the issue could be, but if anyone has any ideas, please post an answer.
I think you have a useless error message, but I'll bet the root cause is an authentication problem such as an expired password or locked account.
See here for a nice write up: https://www.koskila.net/connecting-to-site-failed-hexadecimal-value-0x00-is-an-invalid-character-when-trying-to-connect-to-sharepoint-online/