Other than moving my application to a newer server, does anyone know how to force an application using .NET 4.7 to use TLS 1.2 for a secure https request?
I know the server supports TLS 1.2, I can access the URL fine with Chrome. But the app, using a Microsoft library for talking to an Azure notification hub, is attempting to use TLS 1.0, which stopped working at the end of 2020.
I’ve followed the instructions here:
https://support.microsoft.com/en-us/help/3140245/update-to-enable-tls-1-1-and-tls-1-2-as-default-secure-protocols-in-wi
and here:
2008 R2 TLS 1.2 enabled in registry, rebooted, but not functioning
So I have the SCHANNEL enabling TLS 1.1 and TLS 1.2 for Client and Server
HKEY_LOCAL_MACHINESOFTWAREWow6432NodeMicrosoftWindowsCurrentVersionInternet SettingsWinHttp
and
HKEY_LOCAL_MACHINESOFTWAREWow6432NodeMicrosoftWindowsCurrentVersionInternet SettingsWinHttp is set to have TLS 1.1 and 1.2 with a new DefaultSecureProtocols DWORD set to 0x0A00.
Still, the Azure code I’m running throws an exception in System.Net.HttpWebRequest. Wireshark shows it is attempting to connect with TLS 1.0.