Re: Underlying Connection Was Closed Error

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



"WeluR" <WeluR@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message news:4B717DEB-6325-4734-9D88-5A2882FD624F@xxxxxxxxxxxxxxxx
I have a web client application built on .Net Frameworks 2.0 that connects to
a web service on IIS 6.0 via SSL and using X509 Client Certificates. At some
locations (it works at others), I get the following error. Below is my code.
I've also used System.Net.Tracing and have the traffic generated as a result
of the web request if anyone wants to view it.

System.Net.WebException: There was an error downloading
'https://web-site-url/web-service.asmx'. ---> System.Net.WebException: The
underlying connection was closed: An unexpected error occurred on a send.
---> System.IO.IOException: The handshake failed due to an unexpected packet
format.
at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32
readBytes, AsyncProtocolRequest asyncRequest)
... remainder ommitted for brevity.

I have no idea what could be causing this, but given the "System.Net.Security.SslState.StartReadFrame" being on the stack, this would appear to have to do with the client and server SSL implementations failing to talk to each other. You'd probably get better answers in a different forum. Possibly the microsoft.public.dotnet.framework newsgroup, or the .NET Framework Networking and Communication forum at http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=40&SiteID=1.
--
John Saunders [MVP]

.



Relevant Pages

  • Re: Need for encryption in WSE 3.0 if using SS-avoid man-in-middle
    ... if the other endpoint has a trusted and valid SSL certificate, he would see the data in cleartext. ... But if you let customers change the endpoint address they must be also able to change the server certificate for mutual authentication..so i don't see a real advantage to use additional message security - and you are in the same situation as with transport security. ... I plan on upgrading my .NET 2.0 web service to use WSE 3.0. ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: Securing Web Servicesq
    ... a replay attack on the same session is also avoided because ... SSL session. ... I know you could potentially capture a post to a web service ...
    (microsoft.public.dotnet.security)
  • Re: Web Services and SSL
    ... You don't need to do anything diferent in development to publish a Web Service in SSL. ... You can use WSE 3 with UserNameToken assertion to validate the username and password http://msdn2.microsoft.com/en-us/library/aa480575.aspx ... I have reviewed the MSDN documentation with regards security etc. but ...
    (microsoft.public.dotnet.framework.aspnet.webservices)
  • Re: Web Service, Authentication, Security & Domains
    ... The easy way to do this is with Basic authentication and SSL. ... that does send the password across the wire (although it is ... Windows application will communicate to the Web Service via internet ...
    (microsoft.public.dotnet.security)
  • Re: Underlying Connection Was Closed Error
    ... Yeah, Microsoft Network Monitor 3.1, works fine even on Vista) ... a web service on IIS 6.0 via SSL and using X509 Client Certificates. ... ....If Not userProxy Is Nothing Then ...
    (microsoft.public.dotnet.framework.webservices)