4

Released: General Availability of Microsoft.Data.SqlClient 4.0

 2 years ago
source link: https://techcommunity.microsoft.com/t5/sql-server/released-general-availability-of-microsoft-data-sqlclient-4-0/ba-p/2983346?WT_mc_id=DOP-MVP-4025064
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Released: General Availability of Microsoft.Data.SqlClient 4.0

Released: General Availability of Microsoft.Data.SqlClient 4.0

Published Nov 19 2021 08:00 AM 860 Views

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.



Highlights



Some of the highlights of new features in 4.0 over the 3.0 release of Microsoft.Data.SqlClient include:



Breaking Changes

Encrypt = true, by default

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.



Minor Breaking Changes

There are a few minor breaking changes in 4.0 over previous releases.



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.



David Engel



You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.

%3CLINGO-SUB%20id%3D%22lingo-sub-2983346%22%20slang%3D%22en-US%22%3EReleased%3A%20General%20Availability%20of%20Microsoft.Data.SqlClient%204.0%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2983346%22%20slang%3D%22en-US%22%3E%3CP%3EWe%20have%20released%20for%20general%20availability%20Microsoft.Data.SqlClient%204.0.%20This%20.NET%20Data%20Provider%20for%20SQL%20Server%20provides%20general%20connectivity%20to%20the%20database%20and%20supports%20all%20the%20latest%20SQL%20Server%20features%20for%20applications%20targeting%20.NET%20Framework%2C%20.NET%20Core%2C%20.NET%20Standard%2C%20and%20.NET.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ETo%20try%20out%20the%20new%20package%2C%20add%20a%20%3CA%20href%3D%22https%3A%2F%2Fwww.nuget.org%2Fpackages%2FMicrosoft.Data.SqlClient%22%20target%3D%22_self%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3ENuGet%20reference%20to%20Microsoft.Data.SqlClient%3C%2FA%3E%26nbsp%3Bin%20your%20application.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIf%20you've%20been%20following%20our%20preview%20releases%2C%20you%20know%20we've%20been%20busy%20working%20to%20add%20features%20and%20improve%20stability%20and%20performance%20of%20the%20Microsoft.Data.SqlClient%20library.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId--292448941%22%20id%3D%22toc-hId--292361366%22%3EHighlights%3C%2FH2%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ESome%20of%20the%20highlights%20of%20new%20features%20in%204.0%20over%20the%203.0%20release%20of%20Microsoft.Data.SqlClient%20include%3A%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3EAdded%20%60SqlCommand.EnableOptimizedParameterBinding%60%20property%20that%20when%20enabled%20increases%20performance%20for%20commands%20with%20very%20large%20numbers%20of%20parameters.%20%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fdotnet%2FSqlClient%2Fblob%2Fmain%2Frelease-notes%2F4.0%2F4.0.0.md%23enable-optimized-parameter-binding%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%22%3ERead%20more%3C%2FA%3E%3C%2FLI%3E%0A%3CLI%3EAdded%20%60PoolBlockingPeriod%60%20connection%20property%20support%20in%20.NET%20Standard.%3C%2FLI%3E%0A%3CLI%3EAdded%20support%20for%20%60SqlDataReader.GetColumnSchema()%60%20in%20.NET%20Standard.%3C%2FLI%3E%0A%3CLI%3EAdded%20PropertyGrid%20support%20with%20component%20model%20annotations%20to%20%60SqlConnectionStringBuilder%60%20properties%20for%20.NET%20Core.%3C%2FLI%3E%0A%3CLI%3EAdded%20support%20for%20%60SqlFileStream%60%20on%20Windows%20using%20.NET%20Standard%202.0%20and%20above.%3C%2FLI%3E%0A%3CLI%3EAdded%20%60GetFieldValueAsync%3CT%3E%60%20and%20%60GetFieldValue%3CT%3E%60%20support%20for%20%60XmlReader%60%2C%20%60TextReader%60%2C%20and%20%60Stream%60%20types.%20%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fdotnet%2FSqlClient%2Fblob%2Fmain%2Frelease-notes%2F4.0%2F4.0.0.md%23getfieldvalueasynct-and-getfieldvaluet-support-for-xmlreader-textreader-stream-types%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%22%3ERead%20more%3C%2FA%3E%3C%2FT%3E%3C%2FT%3E%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId--2099903404%22%20id%3D%22toc-hId--2099815829%22%3EBreaking%20Changes%3C%2FH2%3E%0A%3CH3%20id%3D%22toc-hId--1409341930%22%20id%3D%22toc-hId--1409254355%22%3E%26nbsp%3B%3C%2FH3%3E%0A%3CH3%20id%3D%22toc-hId-1078170903%22%20id%3D%22toc-hId-1078258478%22%3EEncrypt%20%3D%20true%2C%20by%20default%3C%2FH3%3E%0A%3CP%3EThere%20is%20one%20major%20breaking%20change%20in%204.0%20over%20previous%20releases.%20Similar%20to%20the%20HTTP%20to%20HTTPS%20default%20changes%20made%20in%20web%20browsers%20a%20few%20years%20back%20(and%20the%20security%20reasons%20for%20them)%2C%20we%20are%20changing%20the%20default%20value%20of%20the%20%60Encrypt%60%20connection%20option%20from%20%60false%60%20to%20%60true%60.%26nbsp%3BWith%20the%20increased%20emphasis%20on%20secure-by-default%2C%20the%20growing%20use%20of%20cloud%20databases%2C%20and%20the%20need%20to%20ensure%20connections%20are%20secure%2C%20it's%20time%20for%20this%20backwards-compatibility-breaking%20change.%20We%20realize%20this%20will%20cause%20some%20disruption%2C%20but%20letting%20clients%20try%20to%20connect%20without%20encryption%20by%20default%20leaves%20them%20open%20to%20attack%20from%20malicious%20actors.%20In%20conjunction%20to%20the%20TrustServerCertificate%20behavior%20change%20introduced%20in%203.0%2C%20those%20upgrading%20from%20older%20versions%20are%20very%20likely%20to%20notice%20the%20change%20if%20they%20are%20relying%20on%20the%20defaults%20and%20are%20not%20already%20using%20trusted%20certificates%20on%20their%20servers.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20action%20item%20if%20you%20are%20affected%20by%20the%20Encrypt%20change%20is%20to%20either%20(in%20order%20of%20recommendation)%3A%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3EInstall%20a%20trusted%20certificate%20on%20your%20server.%3C%2FLI%3E%0A%3CLI%3EChange%20your%20client's%20Encrypt%20connection%20string%20setting%20(or%20Connection%20property)%20to%20false.%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3EIf%20you%20are%20using%20a%20self-signed%20certificate%20and%20the%20Force%20Protocol%20Encryption%20setting%20on%20the%20server%20to%20ensure%20clients%20connect%20with%20encryption%2C%20you%20will%20need%20to%20do%20one%20of%20the%20following%20(in%20order%20of%20recommendation)%3A%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3EChange%20to%20a%20certificate%20that%20is%20trusted%20as%20part%20of%20the%20client's%20trust%20chain.%3C%2FLI%3E%0A%3CLI%3EAdd%20the%20self-signed%20certificate%20as%20a%20trusted%20certificate%20on%20the%20client.%3C%2FLI%3E%0A%3CLI%3EChange%20your%20client's%20TrustServerCertificate%20connection%20string%20setting%20(or%20Connection%20property)%20to%20true.%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3EIf%20you%20maintain%20an%20application%20that%20uses%20Microsoft.Data.SqlClient%20and%20you%20don't%20expose%20the%20Encrypt%20and%20TrustServerCertificate%20settings%20to%20your%20users%2C%20it's%20recommended%20that%20you%20make%20application%20changes%20to%20allow%20users%20to%20opt-in%20to%20non-encrypted%20connections%20or%20connections%20that%20use%20an%20untrusted%20certificate.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ETo%20learn%20more%20encrypting%20connections%2C%20see%20the%20SQL%20Server%20documentation%20on%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fsql%2Fdatabase-engine%2Fconfigure-windows%2Fenable-encrypted-connections-to-the-database-engine%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%22%3Eenabling%20encrypted%20connections%20to%20the%20database%3C%2FA%3E.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId--729283560%22%20id%3D%22toc-hId--729195985%22%3EMinor%20Breaking%20Changes%3C%2FH3%3E%0A%3CP%3EThere%20are%20a%20few%20minor%20breaking%20changes%20in%204.0%20over%20previous%20releases.%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3EThe%20driver%20now%20throws%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CCODE%3ESqlException%3C%2FCODE%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Ereplacing%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CCODE%3EAggregateException%3C%2FCODE%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Efor%20Active%20Directory%20authentication%20modes.%3C%2FLI%3E%0A%3CLI%3EThe%20obsolete%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CCODE%3EAsynchronous%20Processing%3C%2FCODE%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Econnection%20property%20has%20been%20dropped%20from%20.NET%20Framework.%3C%2FLI%3E%0A%3CLI%3ESupport%20for%20.NET%20Core%202.1%20has%20been%20dropped.%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EFor%20the%20full%20list%20of%20added%20features%2C%20fixes%2C%20and%20changes%20in%20Microsoft.Data.SqlClient%204.0%2C%20please%20see%20the%20%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fdotnet%2FSqlClient%2Fblob%2Fmain%2Frelease-notes%2F4.0%2F4.0.0.md%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%22%3ERelease%20Notes%3C%2FA%3E.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAgain%2C%20to%20try%20out%20the%20new%20package%2C%20add%20a%20%3CA%20href%3D%22https%3A%2F%2Fwww.nuget.org%2Fpackages%2FMicrosoft.Data.SqlClient%22%20target%3D%22_self%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3ENuGet%20reference%20to%20Microsoft.Data.SqlClient%3C%2FA%3E%26nbsp%3Bin%20your%20application.%20If%20you%20encounter%20any%20issues%20or%20have%20any%20feedback%2C%20head%20over%20to%20the%20%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fdotnet%2FSqlClient%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%22%3ESqlClient%20GitHub%20repository%3C%2FA%3E%20and%20submit%20an%20%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fdotnet%2FSqlClient%2Fissues%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%22%3Eissue%3C%2FA%3E.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EDavid%20Engel%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-2983346%22%20slang%3D%22en-US%22%3E%3CP%3EWe%20have%20released%20for%20general%20availability%20Microsoft.Data.SqlClient%204.0.%20This%20.NET%20Data%20Provider%20for%20SQL%20Server%20provides%20connectivity%20to%20the%20database%20and%20supports%20all%20the%20latest%20features%20for%20applications%20targeting%20.NET%20Framework%2C%20.NET%20Core%2C%20and%20.NET%20Standard.%3C%2FP%3E%3C%2FLINGO-TEASER%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2983346%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3ESQLServerDrivers%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E

Version history
Last update:

‎Nov 18 2021 08:22 PM

Updated by:
Labels

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK