Last post Sep 03, 2012 02:01 AM by prabu.raveendran
Sep 02, 2012 11:40 PM|enghsiang|LINK
A TCPClient hit the following exception:
ExceptionMessage: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.
StackTrace: at System.Net.Sockets.NetworkStream.Read(Byte buffer, Int32 offset, Int32 size)
at Gateway.Dispatcher.ServiceAgent.BillingAgent.SendBilling(String xml)
This is the code for the TCPClient :
client = new TcpClient(serverIP, port);
stream = client.GetStream();
writer = new StreamWriter(stream);
reader = new StreamReader(stream);
responseData = reader.ReadLine();
Problem occur intermittently.
Sep 03, 2012 02:01 AM|prabu.raveendran|LINK
Refer the below link this may help you to solve your problem,