Quantcast
Channel: MySQL Forums - Connector/NET and C#, Mono, .Net
Viewing all articles
Browse latest Browse all 1447

HResult=0x80131501 on my new Win11 32bit machine (no replies)

$
0
0
This the closest match I could find to post my query, although connector is not explicit in the code. Note: ctor in code below refers to the constructor.
When I login to MySQL 8.3 Command Line Client, I get no error. The connection works fine in HeidiSQL also. When I run my code programatically I get the error.
Message=A call to SSPI failed, see inner exception.
Source=MySql.Data
Inner Exception 1:
Win32Exception: The message received was unexpected or badly formatted
Here is the code:
public void MakeConnection()
{
string connectionstring = "Server=localhost; UID=root; Pwd=<mypassword>; Database=MyDatabase;";
con = new MySqlConnection(connectionstring);
if (con == null) return;
con.Open();
cmd = con.CreateCommand();
}
It throws the error at con.Open(); Interestingly, when I run the exact same code on my Win 8.1 32bit machine, I get no error. Obviously a different instance of MySQL, since both are localhost.
The password is NOT misspelled. Re-typed numerous times in program and command line to be sure.
Here is the stack trace for the error in case that helps:
StackTrace:
at MySql.Data.Common.Ssl.StartSSL(Stream& baseStream, Encoding encoding, String connectionString)
at MySql.Data.MySqlClient.NativeDriver.Open()
at MySql.Data.MySqlClient.Driver.Open()
at MySql.Data.MySqlClient.Driver.Create(MySqlConnectionStringBuilder settings)
at MySql.Data.MySqlClient.MySqlPool.CreateNewPooledConnection()
at MySql.Data.MySqlClient.MySqlPool.GetPooledConnection()
at MySql.Data.MySqlClient.MySqlPool.TryToGetDriver()
at MySql.Data.MySqlClient.MySqlPool.GetConnection()
at MySql.Data.MySqlClient.MySqlConnection.Open()
at DB.BaseDB.MakeConnection() in C:\Users\jonqj\Projects\DB\BaseDB.cs:line 112
at DB.BaseDB..ctor(String cns) in C:\Users\jonqj\Projects\DB\BaseDB.cs:line 100
at MYSQL.MySQL..ctor(String cns) in C:\Users\jonqj\Projects\MYSQL\MySQL.cs:line 14
at ConsoleApp1.Program.Main(String[] args) in C:\Users\jonqj\Projects\ConsoleApp1\Program.cs:line 12

I am in the process of migrating lots of stuff from my win 8.1 machine to my win 11 machine.
What can I do to make this work? Thank you.

Viewing all articles
Browse latest Browse all 1447

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>