I know this has come up a million times, but apparently not with .NET Core using System.Data.Odbc
.
With TLS 1.0 turned of in the registry, I get an error:
{System.Data.Odbc.OdbcException (0x80131937): ERROR [08001] [Microsoft][ODBC SQL Server Driver][DBNETLIB]SSL Security error
ERROR [01000] [Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionOpen (SECDoClientHandshake()).
I get that error when running the ASP.NET Core site on the server that hosts SQL Server, but also using a dev machine on a Windows 10 client, connecting to the remote SQL Server.
SSMS runs and connects fine both on the server and on the client. When I switch on TLS 1.0 support, and restart SQL Server, the site runs fine on both the server and the client. (No need to reboot to see the difference).
To be sure I have enabled the FIPS support, even though I read somewhere that this is no longer needed.
This is the configuration:
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.0\Server] "Enabled"=dword:00000000
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.0\Server] "DisabledByDefault"=dword:00000001
My suspicion is that the System.Data.Odbc
for .NET Standard 2.0 does not support 1.2.
I would love to get some help and pointers.
[EDIT] @TallTed this is what is installed, it should support TLS 1.2:
11.4.7001.0
17.3.1.1
12.2.5543.11
14.0.1000.169
System.Data.Odbc
is not the issue; [Microsoft][ODBC SQL Server Driver][DBNETLIB]
is.
The solution is to get (or confirm you're using) a more recent ODBC Driver for SQL Server, from Microsoft or from my employer or from another vendor...
User contributions licensed under CC BY-SA 3.0