Common WCF Exception : Connection Unexpectedly Closed

后端 未结 12 1038
耶瑟儿~
耶瑟儿~ 2021-02-05 17:19

I have three projects. One is a WCF Services Project, one is a WPF Project, and one is a Microsoft Unit Testing Project. I setup the WCF Services project with a data object th

12条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-02-05 18:02

    Someone on this thread posted that adding this element to the endpoint behavior fixed the issue.

    
    

    This worked but it had to be added not only to the endpoint behavior but the service behavior too (which makes sense since that is where the serialization will take place).

    If it was added to the service only I got this error "Maximum number of items that can be serialized or deserialized in an object graph is '65536'. Change the object graph or increase the MaxItemsInObjectGraph quota."

    If added to the endpoint only I still got the connection unexpectedly closed error.

提交回复
热议问题