Skip to content

The certificate chain was issued by an authority that is not trusted. #3235

@qbqmbur

Description

@qbqmbur

We are using a .Net 8 console application. With this we want to create a database connection using Microsoft.Data.SqlClient package because System.Data.SqlClient is marked as deprecated.

For this we are using a connection string with the format Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=<database>;Data Source=<server>;Encrypt=True;TrustServerCertificate=True;.

Executing the code we get this error: 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.)

When we change the used package to System.Data.SqlClient the application works without any other changes.

Metadata

Metadata

Assignees

Labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions