I"m running a .net 4.5 application which makes secure outbound requests to an external server supporting only TLS 1.1 and TLS 1.2. All goes fine when i run the application from windows 8/8.1 host, but on Windows Server 2008 is fails with: "The underlying connection was closed: An unexpected error occurred on a send."
I believe that .net rely on underling OS infrastructure and because Windows Server 2008 does not support TLS 1.1 and TLS 1.2 the WebRequest also fails. Can somebody confirm that? Any documentation to point me to?
Code sample:
var request = WebRequest.Create("https://SOMEURL");
using (var response = (HttpWebResponse) request.GetResponse())
{
using (var responseStream = response.GetResponseStream())
{
// read the stream
}
}
I'm also setting the supported protocols:
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12;
because Windows Server 2008 does not support TLS 1.1 and TLS 1.2 the WebRequest also fails.
Yes, this is the case.
Any documentation to point me to?
From https://support.microsoft.com/en-us/kb/245030:
Windows Server 2008 supports the following protocols:
SSL 2.0
SSL 3.0
TLS 1.0
Windows Server 2008 R2 and Windows 7 support the following protocols:
SSL 2.0
SSL 3.0
TLS 1.0
TLS 1.1
TLS 1.2
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With