[SQL Server] A connection was successfully established with the server, but then an error occurred during the login process. (provider: SSL Provider, error: 0 - 信頼されていない機関によって証明書チェーンが発行されました。)

inno
2023-03-30 09:58 520 0

SQL SERVER エラー対応方法。

■エラー

 

A connection was successfully established with the server, but then an error occurred during the login process. (provider: SSL Provider, error: 0 - 信頼されていない機関によって証明書チェーンが発行されました。)

 

■対応方法

Connection Stringに「Trust Server Certificate=true」を追加する。

 

Server=localhost;Database=MailTestDB;user=testuser;password=test;Trusted_Connection=false;TrustServerCertificate=True

 

コメント