0

I have a .NET 2.0 application that uses WSE 3.0 to make web service calls over SSL. The application works perfectly on Windows XP after I apply a registry fix which is explained here.

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

When I try to run the same application on a Windows 7 machine (without any registry fix), I get the following error:

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? Or is WSE not supported on Windows 7?

Zak
  • 311
  • 2
  • 5
  • 12
  • For the benefit of anyone else reading this: WSE is obsolete. The better fix would have been to scrap it and use WCF. – John Saunders Nov 19 '10 at 16:56
  • Although I agree that, in general, we should be moving to WCF, I can't see how that would have solved this particular problem. In this case, the server is using an old SSL version. Does WCF allow SSLv3 communication out of the box? – Zak Nov 23 '10 at 13:06

1 Answers1

2

It turns out the problem was indeed similar to the one on XP which required a registry fix. I used Wireshark to check the SSL request and response. 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.

The fix was to add this line of code to force the client to use SSLv3:

ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3;
Zak
  • 311
  • 2
  • 5
  • 12