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

C# project, MySql.Data.dll 8.0.26 & .NET Framework 4.8 issue (no replies)

$
0
0
My VS2019 C# project works with;
MySql.Data.dll 8.0.25 & .NET FW 4.8 or .NET FW 4.7.2
but the same project does not work with
MySqlData.dll 8.0.26 (with & without Nuget package) & ( 4.8 || 4.7.2)

Any suggestions please, thanks.

private void readUserLoginTable()
{
string connectionString= ConfigurationManager.ConnectionStrings["MySQLConnectionString_USER"].ConnectionString;

string query = @"SELECT * FROM " + Tablo._company_login + " WHERE hash = @Hash LIMIT 1";

try
{
using (MySqlConnection connection = new MySqlConnection(connectionString))
{
using (MySqlCommand cmd = new MySqlCommand(query, connection))
{
cmd.CommandType = System.Data.CommandType.Text;
cmd.CommandText = query;
cmd.Connection = connection;
cmd.Parameters.AddWithValue("@Hash",App.HK.USER.hash);

connection.Open(); // This line causes MySqlException ex with the reference MySql.Data.dll 8.0.26
...

ex.Message = SSL Connection error
ex.Number = 0
ex.ErrorCode = -2147467259
ex.InnerException.InnerException = {"Beklenmeyen paket biçimi nedeniyle el sıkışması başarısız oldu."} Unexpected packet format..

Viewing all articles
Browse latest Browse all 1451

Trending Articles