I'm facing an issue with Windows Server 2012R2 and a C#-site that runs on the server. Some external HTTPS-requests fails with this error:
The request was aborted: Could not create SSL/TLS secure channel.
This works perfect on my dev-machine and our test-server (Windows Server 2019). I've come to understand that this is due to the fact that the server we're connecting to requires TLS1.2. So I added this code to be explicit about this:
ServicePointManager.Expect100Continue = true;
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
Still have the same issue. So I digged a little deeper and it looks like the server we're connecting to requires specific chipsets, according to ssllabs.com:
- TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (0xc02f) ECDH secp256r1 (eq. 3072 bits RSA) FS 128
- TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (0xc030) ECDH secp256r1 (eq. 3072 bits RSA) FS 256
- TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256 (0xcca8) ECDH secp256r1 (eq. 3072 bits RSA) FS
And according to my research neither of these are supported on Windows Server 2012R2 - Upgrading the OS seems to be the only option.
BUT: I can make requests to this URL with Google Chrome on this machine (IE11 does not work). If it works with Chome, it feels like it should be possible with my C# code as well?