2010-11-02 126 views
0

我有一個使用WSE 3.0通過SSL進行Web服務調用的.NET 2.0應用程序。應用註冊表修復程序後,該應用程序在Windows XP上完美工作,該修補程序的解釋爲hereWSE 3.0 Windows 7兼容性

的修復說要在下面的註冊表路徑非零值一起使用UseScsvForTls項DWORD值發送SCSV在TLS信令: HKEY_LOCAL_MACHINE \系統\ CurrentControlSet \控制\ 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?

+0

爲了讀者的利益:WSE已過時。更好的解決辦法是廢棄它並使用WCF。 – 2010-11-19 16:56:14

+0

儘管我同意,一般來說,我們應該轉向WCF,但我不明白這將如何解決這個特定的問題。在這種情況下,服務器正在使用舊的SSL版本。 WCF是否允許開箱即用的SSLv3通信? – Zak 2010-11-23 13:06:57

回答

2

原來的問題確實是一個類似於在XP這需要一個註冊表修復。我使用Wireshark來檢查SSL請求和響應。所以事實證明,我打電話給的網絡服務,使用舊版本的SSL(版本3.0),在Windows 7上默認不再支持。

修復是增加這行代碼強制客戶端使用SSLv3:

ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3;