简体   繁体   English

WSE 3.0 Windows 7兼容性

[英]WSE 3.0 Windows 7 Compatibility

I have a .NET 2.0 application that uses WSE 3.0 to make web service calls over SSL. 我有一个.NET 2.0应用程序,它使用WSE 3.0通过SSL进行Web服务调用。 The application works perfectly on Windows XP after I apply a registry fix which is explained here . 该应用程序完美的作品在Windows XP我申请这说明一个注册表修复后这里

The fix says to use the UseScsvForTls entry DWORD value together with a nonzero value in the following registry path to send SCSV for signaling in TLS: HKEY_LOCAL_MACHINE\\System\\CurrentControlSet\\Control\\SecurityProviders\\SCHANNEL 修复程序说使用UseScsvForTls条目DWORD值以及以下注册表路径中的非零值来发送SCSV以在TLS中发送信号:HKEY_LOCAL_MACHINE \\ System \\ CurrentControlSet \\ Control \\ SecurityProviders \\ SCHANNEL

When I try to run the same application on a Windows 7 machine (without any registry fix), I get the following error: 当我尝试在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)  

My question is: Is there a registry fix I can use on Windows 7 to fix this error? 我的问题是:我是否可以在Windows 7上使用注册表修复来修复此错误? Or is WSE not supported on Windows 7? 还是Windows 7不支持WSE?

It turns out the problem was indeed similar to the one on XP which required a registry fix. 事实证明,该问题确实与XP中需要注册表修复的问题相似。 I used Wireshark to check the SSL request and response. 我使用Wireshark来检查SSL请求和响应。 So it turned out the web service I was making calls to, uses an old version of SSL (version 3.0) which is no longer supported by default on Windows 7. 事实证明,我调用的Web服务使用旧版本的SSL(版本3.0),Windows 7上默认不再支持该版本。

The fix was to add this line of code to force the client to use SSLv3: 解决方法是添加以下代码行,以强制客户端使用SSLv3:

ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3;

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM