Search code examples
c#wcf.net-4.8tls1.3

net framework 4.8 + tls.13 = The request was aborted: Could not create SSL/TLS secure channel


Good day. Im updating net framework 4.8 wcf service with tls1.3 (third partiy will stop support tls12 at beginning 2024) and faced with " The request was aborted: Could not create SSL/TLS secure channel." exception during wcf call.

OS: Win 10 pro build 19045 (yeah, I know that win 10 supported tls13 in "experimental" mode), I manually enabled TLS13 via regedit enter image description here

and forced my app use Tls13

ServicePointManager.Expect100Continue = true;
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls13;

But each wcf call throws exception above. According to microsoft net framework 4.8 fully supported tls13.

Can I somehow fix this exception and successfully call wcf third party (with tls13) from net framework application?

P.S. .net 6 application deployed on same machine can communicate with wcf third party without any issues (after adding ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls13) , so I believe this is issue in net 4.8

P.S.S. updating to latest net framework 4.8.1 didnt helped


Solution

  • Update local env up to Windows 11 and host to Windows Server 2022 solved this issue.