The socket connection was aborted - CommunicationException

后端 未结 7 697
我寻月下人不归
我寻月下人不归 2020-12-08 10:54

Originally:

  • I thought this was a circular reference problem........turns out it\'s not.
  • The problem arose from having not configured
7条回答
  •  青春惊慌失措
    2020-12-08 11:03

    that exception is not related to Circular Reference, it's just purely timing out as you try to pump tons of data over the wire.

    The default values that comes with WCF are very very low (these have been changed in WCF 4 I believe). Have a read on these two blog posts, they should give you an idea on how to dethrottle your service:

    Creating high performance WCF services

    How to throttle a Wcf service, help prevent DoS attacks, and maintain Wcf scalability

    Update: also, there are a number of different timeouts in the WCF configuration and depending whether it's the client or server you're talking about you need to update a different timeout clause... have a read of this thread on what each one means and you should be able to figure out which one you need to bump up. Or, you could just set every timeout to int.max if you don't really care if a call can take a loong time to complete.

提交回复
热议问题