Using Encrypt=yes in a Sql Server connection string -> “provider: SSL Provider, error: 0 - The certificate's CN name does not match the passed value.”

后端 未结 2 1284
北海茫月
北海茫月 2020-12-08 16:24

I\'m using Encrypt=yes in a SQL Server connection string, as I need the TCPIP traffic to be encrypted, but on opening the connection I get an error:

<         


        
2条回答
  •  难免孤独
    2020-12-08 16:50

    Your database connection can be configured to encrypt traffic and to accept any certificate from your server. Not a grand solution, but it worked for me.

    The resulting connection string should look like this:

    "[...];Encrypt=True;TrustServerCertificate=True"
    

提交回复
热议问题