【问题标题】:WSE 3.0 Windows 7 CompatibilityWSE 3.0 Windows 7 兼容性
【发布时间】:2011-05-03 20:48:51
【问题描述】:

我有一个 .NET 2.0 应用程序,它使用 WSE 3.0 通过 SSL 进行 Web 服务调用。在我应用了here 解释的注册表修复程序后,该应用程序在 Windows XP 上完美运行。

修复说明使用 UseScsvForTls 条目 DWORD 值和以下注册表路径中的非零值一起发送 SCSV 以在 TLS 中发送信号: HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\SecurityProviders\SCHANNEL

当我尝试在 Windows 7 机器上运行相同的应用程序(没有任何注册表修复)时,我收到以下错误:

The underlying connection was closed: An unexpected error occurred on a send.-   at        System.Web.Services.Protocols.WebClientProtocol.GetWebResponse(WebRequest request)

at System.Web.Services.Protocols.HttpWebClientProtocol.GetWebResponse(WebRequest request)

at Microsoft.Web.Services3.WebServicesClientProtocol.GetResponse(WebRequest request, IAsyncResult result)

at Microsoft.Web.Services3.WebServicesClientProtocol.GetWebResponse(WebRequest request)

at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)  

我的问题是:我可以在 Windows 7 上使用注册表修复程序来修复此错误吗?还是 Windows 7 不支持 WSE?

【问题讨论】:

  • 为了其他阅读本文的人的利益:WSE 已过时。更好的解决方法是废弃它并使用 WCF。
  • 虽然我同意,总的来说,我们应该转向 WCF,但我看不出这将如何解决这个特殊问题。在这种情况下,服务器使用的是旧的 SSL 版本。 WCF 是否允许开箱即用的 SSLv3 通信?

标签: .net windows web-services windows-7 wse


【解决方案1】:

事实证明,这个问题确实与 XP 上需要修复注册表的问题相似。我使用 Wireshark 检查 SSL 请求和响应。结果发现我正在调用的 Web 服务使用的是旧版本的 SSL(版本 3.0),Windows 7 默认不再支持该版本。

修复方法是添加这行代码以强制客户端使用 SSLv3:

ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3;

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多