The socket connection was aborted - CommunicationException

后端 未结 7 705
我寻月下人不归
我寻月下人不归 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:20

    This error can be caused by a number of things. While it was a timing issue in this case, it usually has nothing to do with timings, especially if the error is received immediately. Possible reasons are:

    • The objects used as parameters or return types in your contract don't have parameterless constructors and are not decorated with the DataContract attribute. Check the classes used as parameters or return types, but also all the types used by the public properties of those classes. If you implement a constructor with parameters for one of those classes, the compiler will not add the default parameterless constructor for you anymore, so you will need to add that yourself.
    • The default limits defined in service configuration are too low (MaxItemsInObjectGraph, MaxReceivedMessageSize, MaxBufferPoolSize, MaxBufferSize, MaxArrayLength).
    • Some public properties of your DataContract objects are read-only. Make sure all public properties have both getters and setters.

提交回复
热议问题