The .NET data provider SqlClient for SQL Server has been released in version 5.0 for general availability. This is a new major version so you are advised to check the changes, especially the breaking changes.
At first there are added support for TDS 8.0, but that will not affect most developers or their products. Anyway there is a breaking change with this on the Encrypt property. A quick solution in many cases is to add the keyword TrustServerCertificate
with the value true
to the connection string. This will look like this:
…Integrated Security=SSPI;TrustServerCertificate=true;…
Using TrustServerCertificate
is also described in the Microsoft documentation „Connection String Syntax“ in the section „Using TrustServerCertificate“.
But the added support for SPN on server and failover will be interesting to many working on critical systems using SQL Server AlwaysOn Availability Groups and Kerberos authentication.
I think that the most significant change is the breaking change on added dependency on the Microsoft.SqlServer.Server package. You should really take a detailed look on this if you are working with SqlClient based systems. Even if you are not a developer or architect but "only" Database Administrator or DevOps Engineer. The migration from the namespace Microsoft.Data.SqlClient.Server
in the .NET framework to the namespace Microsoft.SqlServer.Server
in the SqlClient package will require some sort of refactoring code.
See more in the blog post "Released: General Availability of Microsoft.Data.SqlClient 5.0" and the Release Notes on GitHub.
History
2022-08-10 : Post created.
2024-01-20 : Update with TrustServerCertificate
.