(This may happen when you use Windows service as the host. You can search for it.) Here we use a custom hosting host. When developing a WCF programming process, we use the nettcpbinding binding protocol, as a communication protocol, such exceptions may occur, resulting in data transmission. The socket connection is interrupted because of a message processing error, remote host timeout, or underlying network resources. The local socket time is '00: 00: 8080 '. The details are as follows:
The socket connection was aborted. this cocould be caused by an error processing your message or a receive timeout being exceeded by the remote host, or an underlying network resource issue. local socket timeout was '00: 00: 8080 '.
Solution to this problem:
I have searched a lot of materials, and some people in Foreign Forums have encountered such problems.
1. http://social.msdn.microsoft.com/forums/en-US/wcf/thread/637e6097-9161-40ee-8578-46388b7647cd
2. http://social.msdn.microsoft.com/forums/en-US/wcf/thread/06cb1522-31f0-4ce3-85f0-02656228a8e1/
This is the solution discussed on two msdn. Changing other binding protocols can solve the problem.
The reference code is as follows:
Wshttpbinding binding = new wshttpbinding ();
Binding. receivetimeout = new timespan (10, 10, 10 );
The basichttpbinding protocol can also be used in the test results, without such exceptions.
If you have good experience, you are welcome to add.
Series of articles:
Solution to Common Errors in distributed development of WCF (1): An error occurred while attempting to find services at... An error occurred while adding a service reference.
Solution to Common Errors in distributed development of WCF (2) unable to read data from the transmission connection: the remote host forces an existing connection to be closed.
Solution to common WCF distributed development errors (3): client call service errors
Solution to common WCF distributed development errors (4): the type or namespace name 'dataprotocol' could not be found datacontract could not be found
Solution to Common Errors in distributed development of WCF (5) cocould not find a base address that matches Scheme
Solution to Common Errors in distributed development of WCF (6) Service 'wcfserviceapp. wcfservice' has zero Application
Solution to common WCF distributed development errors (7): system. invalidoperationexception, cannot have two operations in the same contract
Solution to common WCF distributed development errors (8): inconsistent accessibility
Solution to common WCF distributed development errors (9): No End Node listener, there was no endpoint listening
Solution to common WCF distributed development errors (11): there is already a listener on IP endpoint, which already has a listener
Solution to Common Errors in distributed development of WCF (12): the server was unable to process the request, the service cannot process the request
WCF distributed development common error (13): the transaction under which this method call was executing, the transaction called by this method is asynchronously interrupted
WCF distributed development common error (14): Invalid operation exception, at least one operation on...
WCF distributed development common error (15): communication with the underlying transaction manager has failed
WCF distributed development common error (16): the transaction has aborted, the transaction has been interrupted
Common error in distributed development of WCF (17): failure to start the MSMQ Service
This article from <a href = 'HTTP: // www.soidc.net '> IDC Expert Network </a> original article: http://www.soidc.net/articles/1213781277395/20090615/1215945539001_1.html
Reference
Http://www.soidc.net/topic/%B7%D6%B2%BC%CA%BD%CD%A8%D1%B6%B4%ED%CE%F3