You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A connection was successfully established with the server, but then an error occurred during the login process. (provider: SSL Provider, error: 0 - The certificate chain was issued by an authority that is not trusted.)'
To reproduce
await connection.OpenAsync();
Expected behavior
It should connect
Further technical details
Microsoft.Data.SqlClient version: 4.0
.NET target: .net 6
SQL Server version:
Operating system: Win 10
Workaround
Use System.Data.SqlClient, it works.... or use Microsoft.Data.SqlClient 3.0.1
The text was updated successfully, but these errors were encountered:
To anyone finding this, in my case it was due to the self signed server certificate. see #1210 (comment):
Systems using SQL Server's self-generated certificate will fail after this change and the user will have to buy a certificate or create a self-signed certificate, or change their connection string. If the change was made for scenarios where the user could not modify the connection string to enable encryption, then they are left having to get new certificates.
The fixes are:
disable encryption on the client connection string with Encrypt=false
blindly trust the server certificate with TrustServerCertificate=True
use an external certificate on the sql server that is signed by a certificate authority in the clients trusted certificate authorities.
3b) if the sql server already has an externally signed certificate, trust the signing certificate authority on the client.
Describe the bug
Unable to open trusted connection
To reproduce
Expected behavior
It should connect
Further technical details
Microsoft.Data.SqlClient version: 4.0
.NET target: .net 6
SQL Server version:
Operating system: Win 10
Workaround
Use System.Data.SqlClient, it works.... or use Microsoft.Data.SqlClient 3.0.1
The text was updated successfully, but these errors were encountered: