Welcome! Log In Create A New Profile

Advanced

Connecting to SQL server with native connector issue

Posted by alex.kolaric 
Connecting to SQL server with native connector issue
February 20, 2024 11:56PM
Hi everyone,

We recently found a problem with one of our apps moved to WD 2024. We are connecting to SQL server using native connector and it was working just fine with WD 24. Since we moved to 2024 we are getting:

"The certificate chain was issued by an authority that is not trusted"

error when trying to establish connection to the server at one of our customers. I tried using Encrypt = False and TrustServerCertificate=true in all combinations but we were not able to connect. The only way to connect was to force WD CLIENT VERSION = 2012 which is forcing usage of older SQLnCli12 client library. This is obviously not a solution because we do not want to use older client library.

Any ideas?

Thanx,
Alex
Re: Connecting to SQL server with native connector issue
February 24, 2024 07:20PM
Hi Alex,

Have a read of this - I've not tried it because I don't use M$ SQL, but it might help resolve your issue?

[learn.microsoft.com]

Regards,
Darren.
Re: Connecting to SQL server with native connector issue
February 24, 2024 10:38PM
Hi Darren,

Thank you for your response. I tried all that this article suggests except installing different client drivers because we do not have control over it. To summarise it, nothing works. That is why I asked if anyone within community had similar problem. It is interesting that this happens with a single server we deploy our app at. All other instances of our app are working as expected. I was not able to see any difference between the server setting and additionally the server in case is set to use unencrypted connections.

Thanx again for your help,
Alex
pao
Re: Connecting to SQL server with native connector issue
February 26, 2024 09:47AM
Normally tihs is becuase the SQL SERVER instance is configured with force encryption=yes and the certificate used isn't from a trusted CA.

Did you try to add the certificate or the CA uused to generate it to the trust ones or use "Trust Server Certificate=True" in the extended properties of the connection?

Regards

Paulo Oliveira
Re: Connecting to SQL server with native connector issue
February 26, 2024 04:12PM
Hi Paulo,

The weird thing is that SQL server is configured with force encryption=no. Unfortunately we do not have privileges to install certificates. I tried "Trust Server Certificate=True" but it behaves the same. I also tried "Encrypt=No" within the extended properties of the connection but no luck.

Thanks,
Alex
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: