We have released for general availability Microsoft.Data.SqlClient 4.0. This .NET Data Provider for SQL Server provides general connectivity to the database and supports all the latest SQL Server features for applications targeting .NET Framework, .NET Core, .NET Standard, and .NET.
To try out the new package, add a NuGet reference to Microsoft.Data.SqlClient in your application.
If you've been following our preview releases, you know we've been busy working to add features and improve stability and performance of the Microsoft.Data.SqlClient library.
Some of the highlights of new features in 4.0 over the 3.0 release of Microsoft.Data.SqlClient include:
There is one major breaking change in 4.0 over previous releases. Similar to the HTTP to HTTPS default changes made in web browsers a few years back (and the security reasons for them), we are changing the default value of the `Encrypt` connection option from `false` to `true`. With the increased emphasis on secure-by-default, the growing use of cloud databases, and the need to ensure connections are secure, it's time for this backwards-compatibility-breaking change. We realize this will cause some disruption, but letting clients try to connect without encryption by default leaves them open to attack from malicious actors. In conjunction to the TrustServerCertificate behavior change introduced in 3.0, those upgrading from older versions are very likely to notice the change if they are relying on the defaults and are not already using trusted certificates on their servers.
The action item if you are affected by the Encrypt change is to either (in order of recommendation):
If you are using a self-signed certificate and the Force Protocol Encryption setting on the server to ensure clients connect with encryption, you will need to do one of the following (in order of recommendation):
If you maintain an application that uses Microsoft.Data.SqlClient and you don't expose the Encrypt and TrustServerCertificate settings to your users, it's recommended that you make application changes to allow users to opt-in to non-encrypted connections or connections that use an untrusted certificate.
To learn more encrypting connections, see the SQL Server documentation on enabling encrypted connections to the database.
There are a few minor breaking changes in 4.0 over previous releases.
AggregateExceptionfor Active Directory authentication modes.
Asynchronous Processingconnection property has been dropped from .NET Framework.
For the full list of added features, fixes, and changes in Microsoft.Data.SqlClient 4.0, please see the Release Notes.
Again, to try out the new package, add a NuGet reference to Microsoft.Data.SqlClient in your application. If you encounter any issues or have any feedback, head over to the SqlClient GitHub repository and submit an issue.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.