DataContractJsonSerializer and maxItemsInObjectGraph
问题 How can I set the maxItemsInObjectGraph for the DataContractJsonSerializer? I get an error saying "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." Where does the number 65536 come from. The documentation for DataContractJsonSerializer says the default is Int32.MaxValue. I tried to set it in the behavior configuration: <endpointBehaviors> <behavior name="WebBehavior"> <webHttp />