PaulG
PaulG

Reputation: 7122

maxItemsInObjectGraph in asp.net web service?

A client of ours is using an asp.net web service (asmx) I created and is getting an error saying the maxItemsInObjectGraph is too small. I told him to make the necessary changes in his app.config file. But where do I have to make these changes on my side?? The web.config file in my web service doesn't mention maxItemsInObjectGraph.

Thanks a lot.

Upvotes: 0

Views: 1075

Answers (1)

shriek
shriek

Reputation: 5197

Because it has a default value which is used when it's not in your config. You'll have to either add it to your web.config or to your code as shown here, here, here or here.

EDIT: For ASMX there isn't a setting for maxItemsInObjectGraph, setting the maximum request length might help though.

<location path="yourservice.asmx">
 <system.web>
    <httpRuntime executionTimeout="240" maxRequestLength="20480" />
 </system.web>
</location>

Other properties for the httpRuntime on MSDN

Upvotes: 1

Related Questions