Search code examples
c#.netwindowsweb-servicesservice-reference

https request error on winXP


i have a c# console application which consumes a webservice (a public webservice of a goverment). To do this, i added a Webservice Reference in my C#-Project, call the appropriate methods and everything works fine on. Except on one PC.

It's a Windows XP SP2 PC, i installed .net framework 4 (which is the target framework of my application). When i call the same commandline-tool here i always get an error message. 100% percent the same tool with same parameters works fine on every other clients (Windows 7, Windows 8, Windows 8.1, even other Windows XP machines)!?!?!?

Error message:

Unhandled Exception: System.ServiceModel.CommunicationException: An error occurred while making the HTTP request to https://adress.com/services/TheServiceWSI.

This could be due to the fact that the server certificate is not configured properly with HTTP.SYS in the HTTPS case. This could also be caused by a mismatch of the security binding between the client and the server. ---> System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a send. ---> System.IO.IOException: Received an unexpected EOF or 0 bytes from the transport stream.

I tried:

  • deactivating firewall
  • reinstalling .net framwork 4
  • deactivating antvir software
  • install all windows updates

but no success...

Has anyone an idea what could be the problem here?

Thanks in advance!


Solution

  • TL;DR; Make sure your XP installations are fully patched with SP3 and all the security patches. A lot of SSL/TLS vulnerabilities were patched.

    I recognize this problem, it could be related to the BEAST vulnerability mitigation (though could as well be one of the other vulnerability patches mentioned in the other answer). After Apple implemented the mitigation on their end with Mavericks, I got similar errors when talking to older Windows services. The reason was related to how packets were fragmented, which triggered errors in implementations that did not exactly follow the spec (apparently Microsoft did not earlier, but they are now).

    Either way, you need to drop SP2 and make sure you run SP3.

    If you have control over the server, you could try to disable the BEAST mitigation. According to that post, XP SP3 should work with the BEAST mitigation though, so it is probably more of academic interest. Disabling security-related fixes in a production environment is probably not wise.

    As you are probably aware of, Windows XP has long passed end of extended support and has gone without security patches for over a year.