Reputation: 1649
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;
Upvotes: 3
Views: 3760
Reputation: 5027
I found an indirect proof for you.
SecurityProtocolType Enumeration
Specifies the security protocols that are supported by the Schannel security package.
Support for SSL/TLS protocols on Windows
Now let’s come to the point, on Windows the support for SSL/TLS protocols is tied to the SCHANNEL component. So, if a specific OS version doesn’t support a SSL/TLS version, this means it remains unsupported.
Secure channel compatibility support with SSL and TLS
Upvotes: 0
Reputation: 123541
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
Upvotes: 1