Reputation: 159
Hi I am stuck in strange issue,
I have an Generic list List<Accounts>
it is populated from database, then this list is returning to client.
When list contains more than 3000 items it is throwing exception.
I have set following values in web.config
maxDepth="2147483647"
maxStringContentLength="2147483647"
maxArrayLength="2147483647"
maxBytesPerRead="2147483647"
maxNameTableCharCount="2147483647"
Upvotes: 1
Views: 280
Reputation: 10424
As Kirk mentioned, try add a behavior to your config similar to below:
<behaviors>
<endpointBehaviors>
<behavior name="MyService.MyServiceBehavior">
<dataContractSerializer maxItemsInObjectGraph="2147483647"/>
</behavior>
</endpointBehaviors>
</behaviors>
If this works for you then don't mark me as correct, Kirk you add an answer and I will remove this one
Upvotes: 1
Reputation: 66573
Here are some solutions you could try:
Otherwise, edit your question to include information about the exception you’re getting and any other information that may be relevant.
Upvotes: 0