WebRequest针对Windows Server 2008的TLS 1.1 / 1.2进行故障转移 [英] WebRequest fails over TLS 1.1 / 1.2 for Windows Server 2008

查看:217
本文介绍了WebRequest针对Windows Server 2008的TLS 1.1 / 1.2进行故障转移的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在运行.net 4.5应用程序,该应用程序向仅支持TLS 1.1和TLS 1.2的外部服务器发出安全的出站请求。当我从Windows 8 / 8.1主机运行该应用程序时一切正常,但在Windows Server 2008上失败并出现:
基础连接已关闭:发送中发生意外错误。

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."

我相信.net依赖于底层操作系统基础结构,并且Windows Server 2008不支持TLS 1.1和TLS 1.2,WebRequest也会失败,有人可以确认吗?任何指向我指向的文档吗?

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?

代码示例:

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;


推荐答案


因为Windows Server 2008不支持TLS 1.1和TLS 1.2,WebRequest也会失败。

because Windows Server 2008 does not support TLS 1.1 and TLS 1.2 the WebRequest also fails.

是的,就是这种情况。


有任何文档指向我吗?

Any documentation to point me to?

来自 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

这篇关于WebRequest针对Windows Server 2008的TLS 1.1 / 1.2进行故障转移的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆