question

AmbarishBakre-6339 avatar image
0 Votes"
AmbarishBakre-6339 asked AmbarishBakre-6339 edited

TLS 1.2 with Windows Server 2016 and .NET 3.5

Hi,

I have a Windows WCF app written in .NET 3.5 trying to run with TLS 1.2 which generates a "System.NotSupportedException: The requested security protocol is not supported" on Windows Server 2016 (Version 1607 OS build 14393.4402).

As per this, the error would occur if the hotfix is not installed. According to this, the TLS 1.2 support for .NET 3.5 was introduced as hotfix in kb3156421 in Windows Server 2016 Technical Preview 4 so should already be a part of official release. Also, all windows updates till April 2021 have also been installed.

The same app can run on another Windows Server 2016(and other Windows versions) with TLS 1.2 and seems to have no difference with the non-working one. Any help/guidance would be appreciated.

UPDATE: Found test program on github, which fails with same error on the non-working windows server instance.


windows-server-2016dotnet-runtime
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

CarlFan-MSFT avatar image
0 Votes"
CarlFan-MSFT answered AmbarishBakre-6339 edited

Hi,
We could try to check some registry settings on the Server 2016 for enabling the TLS 1.2 protocol and enabling TLS 1.2 on .NET Framework 3.5 below:
https://www.itnota.com/enabling-tls-1-2-default-security-protocol-windows-servers/
Also I suggest that if the security software is running, disable it temporarily.
Hope this helps and please help to accept as Answer if the response is useful.
Best Regards,
Carl

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thank you for the response Carl. We managed to resolve it by setting SystemDefaultTlsVersions and SchUseStrongCrypto in

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft.NETFramework\v4.0.30319 and HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft.NETFramework\v4.0.30319.

It is weird as our app is in .NET 3.5 and same works on another environment with Server 2016 without the above registries set. The only difference seems to be the non-working one was hosted on Azure and was WIndows Server 2016 Datacenter edition vs Standard edition on the working environment.

0 Votes 0 ·