1

Using the following connectionstring when setting up a connection to a SQL Azure database from MS SQL Report builder using the Microsoft SQL Azure connection type.

Data Source=xxxxxx.database.windows.net;Initial Catalog=xxx;Encrypt=True;TrustServerCertificate=False;

but getting the following error message

A connection was successfully established with the server, but then an error occurred during the pre-login handshake. (provider: SSL Provider, error: 0 - The certificate's CN name does not match the passed value.)

When using

TrustServerCertificate=True;

Then the connection is successful.

Looks like the certificate issued by Microsoft Azure is not being trusted by my workstation?

Joffies
  • 38
  • 4

1 Answers1

1

As mentioned here you can set TrustServerCertificate=True, setting it to False is just more secure and should help prevent man-in-the-middle attacks. If you set TrustServerCertificate to false then the Encrypt setting should be set to True, but sometimes it does not work due to non-IFS LSPs installed on your computer as explained here.

Alberto Morillo
  • 13,893
  • 2
  • 24
  • 30
  • From a security perspective we want the TrustServerCertificate=False. Will investigate the non-IFS LSPs route and see if that resolves the issue. We did attempt a Winsock Reset as suggested on the web but that didn't resolve the issue. – Joffies Jun 26 '18 at 17:33