tags:

views:

137

answers:

1

Recently I came across this error in my WCF trace:

There was an error while trying to serialize parameter http://tempuri.org/:ProcessAllTasksResult. The InnerException message was '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. '.

So I would like to know how to change the object graph, I already know how to increase the MaxItemsInObjectGraph quota.

+1  A: 

Is your service perhaps allowing the consumer to search for a collection of matching entities? If so, consider limiting the maximum number of entities returned in each invocation, perhaps by adding "pagination" parameters to the service contracts to allow the user to request m results starting at result n, or similar.

Ian Nelson
Absolutely right Ian. I overlooked this, thought I had fixed it!
JL