I am receiving the following error from ADOMD while trying to connect to my SSAS Server.
An unhandled exception of type 'System.Xml.XmlException' occurred in
Microsoft.AnalysisServices.AdomdClient.dll
Additional information: Element 'return' was not found. Line 5,
position 2.
I can confirm the following:
My Connection String Is:
Data Source=<MyServer>;Catalog=<My SSAS DB>; UID=<MyDomain>\<MyDomainUser>;PWD=<MyPassword>;
I can confirm that my connection string is correct ( or at least the data I am using in the connection string above is correct). If I change any part of the connection string to an incorrect value the ADOMDConnection will return "Cannot connect to server". I have also looked at the audit logs on the server itself and confirm that I am successfully logging onto the server. And the contrary, with incorrect credentials the server logs confirm a failed login.
I am trying to connect to SSAS 2014 Enterprise
The failed connection returns within a few seconds. A few posts out on the internet suggest increasing the Connection Timeout property. This does not seem to be my issue as I have increased it to 120 and its failing within 5.
I am using ADOMD 12.0 Runtime 2.0.50727
My domain user is a domain admin and has been added to an admin role in the SSAS.
Im not sure what else could be wrong or how to debug this or is this a known bug in ADOMD?
Any advice would greatly appreciated.
thanks!
Jason
This happens routinely when the version of the ADOMD client DLL is not a version that matches the target version of the server instance. For example, Azure Analysis Services as of 09/13/2017 does not work with Microsoft.AnalysisServices.AdomdClient.dll version 13. Only version 14 and above.
For reference, the ADOMD DLL for Azure Analysis Service is available in the link below:
https://learn.microsoft.com/en-us/azure/analysis-services/analysis-services-data-providers
Double check to make sure the client DLL is the exact version needed for the target server instance. That solved this exact issue in my case.
Related
I am trying to connect to a remote ssh server using the SshNet package.
My code looks like this:
List<AuthenticationMethod> authenticationMethods = new List<AuthenticationMethod>();
authenticationMethods.Add(new PasswordAuthenticationMethod(SSHusername, SSHpassword));
SSHConnection = new SshClient(new ConnectionInfo(ip, Int32.Parse(SSHport), SSHusername, authenticationMethods.ToArray()));
SSHConnection.Connect();
When the program tries to make the connection, I get the following exception:
Exception thrown: 'Renci.SshNet.Common.SshConnectionException' in Renci.SshNet.dll
An exception of type 'Renci.SshNet.Common.SshConnectionException' occurred in Renci.SshNet.dll but
was not handled in user code
Server response does not contain SSH protocol identification.
I have been searching for a solution for 2 hours now, but haven't been able to fix it.
Looking through the source code of SshNet if found this error is thrown when the client doesn't get an ssh version from the server. I'm not an expert in this field, but looking at wireshark the server sends a packet with this info:
SSH-2.0-OpenSSH_8.2p1 Ubuntu-4ubuntu0.1
I'm pretty sure this is the ssh version it's looking for. So I hope one of you guys can tell me what else I can try to fix this.
My Core project has target framework .NET standard 2.0, the UWP project's min version is Windows 10 1903. The SshNet package is on version 2016.1.0
I have a simple MVC app I'm working on. I'm trying to connect to a MSSQL server using Entity Data Model (code first from database). After successfully adding the data using the Entity Data Model Wizard, the code below throws the error "The provider did not return a ProviderManifestToken string". The inner exception is "Unable to connect to any of the specified MySql Hosts. The thing I can't figure out though, is I'm not using MySql anywhere in the project. Searching in the project explorer for "MySql" turns up nothing. Doing a Ctrl+F and searching for MySql also returns nothing found. My web.config only has the one connection string in it for the MSSQL server connection. What can I do to figure out why my project is trying to connect to this unknown MySQL server?
My code:
string something = kyg.Products.FirstOrDefault(m => m.ItemNo == "128676").ShortDescription.ToString();
I don't have an issue with the MSSQL server - I have many apps that are running successfully on the same connection. I just can't find this unknown reference to a MySql server. Any Ideas on where to look/what to try?
Edit
I felt it is worth mentioning that I inherited this project, and can't confirm what development was done on it prior to me taking it over. Also, I was looking through the files, and did find MySql.Data.dll, MySql.Data.Entity.EF6.dll, and MySql.Web.dll. I moved these files out of the bin folder, and now receive a different error -
File Not Found - Could not load file or assembly MySql.Data.Entity.EF6.dll - so something is trying to reference that dll, I just can't figure out what or where it is coming from.
Thanks in advance,
I'm using a package from NuGet which works on localhost, worked on a production server but after a recent move to a different production server, I get the following error:
Attempt by method 'EntityFramework.BulkInsert.Extensions.TypeExtensions.GetPrivateFieldValue(System.Object, System.String)' to access field 'System.Data.SqlClient.SqlConnection._connectionString' failed.
The package is: https://efbulkinsert.codeplex.com/ I don't think it's package specific because using an alternative package for bulk inserts I get a similar error:
Attempt by method 'Z.Utility.SqlBulkOperation.SetCommonSetting()' to access field 'System.Data.SqlClient.SqlBulkCopy._connection' failed.
The common thing here is System.Data.SqlClient.xxx._connection failed
Are there any IIS setting I need to look at? I'm stumped.
I had to change the .NET Trust Levels from Medium to Full in IIS.
I've been searching for a solution to my doubt but couldn't find anything more relevant than an installation issue, which isn't a problem in my case.
I am trying to execute a C# project (similar to this) that creates a local cube (.cub) file and processes data taken from an existing processed cube on Analysis Services 2012.
The project runs correctly when I use a connection string for output cube that points (and hence writes) to another database on Analysis Services. But when I execute the project using the following connection string that points to the local cube file to be created, it gives me errors depending on the version of ADOMD library referenced.
conn.ConnectionString =
string.Format( "Provider=MSOLAP;Data Source={0}", "c:\\output\\mycube.cub" );
When referenced to ADOMD 11 library, I get the following errors:
OLE DB error: OLE DB or ODBC error: A network-related or instance-specific error has occurred while establishing a connection
to SQL Server. Server is not found or not accessible. Check if
instance name is correct and if SQL Server is configured to allow
remote connections. For more information see SQL Server Books Online.;
08001; Client unable to establish connection; 08001; Encryption not
supported on the client.; 08001.
Errors in the high-level relational engine. A connection could not be made to the data source with the DataSourceID of 'DB_NAME', Name of
'DB_NAME'.
When referenced to ADOMD 12 library, I get the following error:
A connection cannot be made. Ensure that the server is running.
Although, I know SQL Server Analysis Services are running when I checked in services.msc.
Figured it out. I was missing a reference to the assembly Microsoft.AnalysisServices.dll
First of all, let me tell you that I have tried every damn thing by Googling to overcome this error and I have not done any TYPO error either. But, none of the Google results helped. Let me tell you the scenario... I installed Visual Studio Ultimate 2013 (and nothing else, no separate sqlexpress, nothing). All non-DB apps are working fine. But, for one project, when I tried to create new database connection (by right clicking 'data connections' or clicking 'connect to database' icon for creating localdb), I got this error:
"A network-related or instance-specific error occurred while
establishing a connection to SQL Server. The server was not found or
was not accessible. Verify that the instance name is correct and that
SQL Server is configured to allow remote connections. (Provider:
sqlnetwork interfaces, error 26- Error locating server/Instance
specified)"
Then, as usual, I tried to Google for it. But most of the answers were related to sqlexpress (which I didn't installed separately). Then one answer was about "sqlserver configuration manager" and enabling sqlservices and something called surface area.... But, as "sqlserver configuration manager" was not there in my 'all programs' on my windows 8 (64x) machine, I downloaded sqlexpress and sqlserver management studio too. But an item named something like "surface area manager...." was not there. I enabled sqlservices, all tcp/ip ports. Shut down my firewall. Still getting the same error.
NOTE: I dont have any connection string in my webconfig till now because I was just going to create the new DB. So the the answer about editing conn string doesn't mattered to me.
NOTE: This was not the case with Visual Studio 2012. On only VS2012 (and nothing else) installation, it worked fine for creating the DBs and all other things. So, what's wrong with VS2013??
Server \ Instance name must be reachable from your client, as the creation of the connection string will try to verify that it connected OK. Try this from your workstation:
sqlcmd -Sservername\Instance_or_IPaddress_of_Sql_server -E -Q"select ##version"
Until you get a proper server name or instance, you will not be able to successfully create a db connection.