Calling Web Service Error

A Ahmed Sobhy 3 years 6 months ago
1 0 0

Hello,
I develop application that connect to web service (php) it was working fine until the application suddenly stopped !!! after that i try to continue my work i got the following error:

System.Net.WebException was unhandled
  Message="Unable to read data from the transport connection."
  StackTrace:
       at System.Net.HttpWebRequest.finishGetResponse()
       at System.Net.HttpWebRequest.GetResponse() .....
  InnerException: System.Net.Sockets.SocketException
       Message="An existing connection was forcibly closed by the remote host"
       ErrorCode=10054
       NativeErrorCode=10054
       StackTrace:
            at System.Net.Sockets.Socket.ReceiveNoCheck(Byte[] buffer, Int32 index, Int32 request, SocketFlags socketFlags)
            at System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags) ...

After i got this error i thought something goes wrong with web service on the server, so i have created Windows Form application that will consume the same web service, the result was i can consume the web service normally without any errors.

I tried to follow this link Unable to read data from the transport connection. - Microsoft Technologies by change the registry of HKEY_LOCAL_MACHINE\Comm\Tcpip\Parms to add EnablePMTUDiscovery and MTU Keys but with no luck so far, it's very critical issue because my application depends on web service.

Please any help to solve this issue.

Regards,
Ahmed Sobhy

CONTACT
Can’t find what you’re looking for?