When the amount of data returned by the server is too large, the client displays a communication error.
The problem today is "the number of items in the object graph that need to be serialized or deserialized exceeds the upper limit of" 65536 ".
This problem requires that the service segment and the client of the WCF system modify the configuration separately to increase this limit.
The service section is modified as follows:
<system.serviceModel> <behaviors> <serviceBehaviors> <behavior name="default"> <servicemetadata/> <servicedebug includeexceptiondetailinfaults="true"/> <datacontractserializer maxitemsinobjectgraph="2147483647"/> </behavior> </serviceBehaviors> </behaviors> <services> <service N Ame="*"behaviorconfiguration="default"> "net.tcp://localhost:1200"/> </baseAddresses> "nettcpbinding"/> <endpoint address="Mex"binding="mextcpbinding"contract="IMetadataExchange"/> </service> </services> </system.serviceModel>
The client modifies the following:
<system.serviceModel> <client> <endpoint name="*"address="net.tcp://127.0.0.1:1200"contract="*"binding="nettcpbinding"behaviorconfiguration="default"/> </client> <behaviors> <endpointBehaviors> <behavior name="default"> <datacontractserializer maxitemsinobjectgraph="2147483647"/> </behavior> </endpointBehaviors> </behaviors> </system.serviceModel>
WCF run-time error-"maxitemsinobjectgraph" is too small