I have a WCF service deployed on ServerA. I am using tcp binding.
I also have a web farm which consists of ServerB and ServerC.
When I deploy my application which consumes the WCF service on any of the servers ServerB or ServerC, I get an error when trying to call my service. I added tracing and this is the error I get:
The socket connection was aborted. This could 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 '10675199.02:48:05.4775807'.
I tried to consume the same service from my pc and it works fine. I also tried to deploy the application on other servers which arent on the web farm, but are on the same network and I am also able to consume my service.
So I figured out the problem is related to the fact Servers B and C are on a web farm. This is just a guess, but I couldnt find any other reason for this behavior.
Any help is appreciated. Thanks.
If the servers are behind a load balancer you may have to do the following (useRequestHeadersForMetadataAddress ):
<serviceBehaviors>
<behavior name="YourServiceBehavior">
<useRequestHeadersForMetadataAddress />
</behavior>
</serviceBehaviors>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.