-
Notifications
You must be signed in to change notification settings - Fork 281
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Invalid value for key 'Encrypt' #2019
Comments
@qizu0302 Sure you are not referencing the System.data.SqlClient SqlConnectionStringBuilder? |
@ErikEJ Pretty sure I use M.D.S lib |
@qizu0302 not sure on your setup, I just tested with that version and it worked fine. Can you provide a repro please? |
could this be the same issue as #2015 ? |
Here's my part of code:
configDatabaseConnection is used to set up the connection between SharePoint server and SQL Server, the output is below:
|
@JRahnama does your PR aim at this issue? After your PR check in, how can I get the latest library? I mean which NuGet package version I need to use. |
I think it's this set of artifacts from the CI build https://sqlclientdrivers.visualstudio.com/904996cc-6198-4d39-8540-eca72bdf0b7b/_apis/build/builds/64525/artifacts?artifactName=Artifacts&api-version=7.0&%24format=zip |
This is 5.10.0 version, I don't see it on https://www.nuget.org/packages?q=Microsoft.Data.SqlClient. |
BTW, in order to use TLS 1.3, do I have to use SQL Server 2022 and SSMS 19.0? |
for TLS 1.3 it has to be SQL Server 2022 and Encrypt type Strict. SSMS 19 yet to add support for it. You can use M.D.SqlClient to achieve that. |
I have a basic question, if I do following steps:
Does it use TLS 1.3 when connecting to localDB via SSMS? If I want to let a client to connect to SQL Server using TLS 1.3, is there any configurations need to do on SQL Server side besides setting specific configurations in ConnectionString and registry on client side? |
SSMS 19.0 does not support TLS 1.3 |
Encryption types are not supported on LocalDB. Also to add more SSMS 19, as @ErikEJ mentioned, is not supporting Strict and TLS 1.3. From what I know, you can check and confirm with SSMS team, it will be added in next version of SSMS. |
I create a self-signed cert on Sql Server via then import this cert on my client side to be its trusted CA, do following settings in my code
I enable TLS 1.3 and disable legacy versions on client server, set "Force strict encryption" to "yes" on Sql Server.
According to https://learn.microsoft.com/en-us/sql/relational-databases/security/networking/tds-8-and-tls-1-3?view=sql-server-ver16#differences-between-tls-12-and-tls-13, RSA key exchange is removed in TLS 1.3 and my cert uses RSA as KeyAlgorithm, is this the root cause? If so, what else algorithms can I use? |
Hi team, any updates on this? Im using
|
Please update EF Core to v7 to use MDS 5.1+. Closing as compatibility error. |
I'm using Microsoft.Data.SqlClient 5.1.0, set SqlConnectionStringBuilder.Encrypt to SqlConnectionEncryptOption.Strict, it always pop up "Invalid value for key 'Encrypt' " error, I tried other values as well, like true/false/SqlConnectionEncryptOption.Optional, all failed.
Do you know the right value for 'Encrypt' value?
And if I want to set up a TLS 1.3 connection to SQL server, do I need to use the latest SQL Server release?
The text was updated successfully, but these errors were encountered: