Sample Header Ad - 728x90

Is there a version of System.Data.SqlClient that does not support Encryption for Connections?

0 votes
1 answer
253 views
I am looking at IIS server that hosts tens of applications. Some of them are pretty old. All of them are using connection strings that are stored in machine.config in C:\Windows\Microsoft.NET\Framework64. All connection strings are pointing to SQL Server 2016, and are using System.Data.SqlClient for connections: providerName="System.Data.SqlClient" The goal is to migrate data to new Azure SQL Managed Instance and replace connection strings so they point to new server. In Azure SQL Managed Instance, encryption for connections is mandatory, you can't turn it off. You can only select minimal TLS version (1.0, 1.1 or 1.2). MI connection strings contain Encrypt=True;TrustServerCertificate=False. I've tried setting Encrypt=False in SSMS for test, but then querying sys.dm_exec_connections encrypt_option was still showing TRUE. Do all versions of System.Data.SqlClient support encryption for connections, or there are some old versions that do not support it? Asking this, because I want to prevent situation where after migration some app potentially can stop working because its client driver does not support encryption.
Asked by Aleksey Vitsko (6195 rep)
Mar 13, 2024, 01:29 PM
Last activity: Mar 15, 2024, 01:32 PM