Selfhosted server and SSL communication over TLS

406 Views Asked by At

I have an application that hosts WebAPI (HttpSelfHostServer) on windows service. Communication over SSL (self-signed certificate for localhost). Now I have two cases:

  1. Windows7 - when calling API method (from the browser for example) I see that TLS 1.0 is used
  2. Windows10 - the same call, but here we have TLS1.2

It is the same app in both cases. Moreover, I have set the following property in the entry point of the service

ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;

When I open any page on IE on Win7 I can see that TLS1.2 is ok. What do I have to do, to force communication over TLS1.2 in my WebAPI on Win7?

Any ideas?

1

There are 1 best solutions below

0
jessiebot On

Consider checking to see if TLS 1.1 / 1.2 is enabled on your Windows 7 machine.

Example: [1]: https://help.runbox.com/enabling-tls-1-2-on-windows-7/

You could also consider using IIS Crypto if you don't want to play in the registry:

https://www.nartac.com/Products/IISCrypto/

Use caution if you access these machines by a remote connection!