Socket Errors generated by using nettcpbinding in WCF

Source: Internet
Author: User

Recently, Windows Service was used as the host of WCF services in the project. There were no exceptions or errors in service and client calls, but the following errors often occurred:

"System. servicemodel. communicationexception: 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 '2017. 02:48:05. 4775807 '"

The following is a solution: when using the WCF Service to use nettcpbinding, you need to call the close () method on the client proxy to close the proxy and put the service instance back to the pool.

This problem does not occur when the WCF Service uses wshttp or basichttp.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.