New to Telerik UI for ASP.NET AJAX? Download free 30-day trial

Maximum Length Exceeded Error in WebService Data Binding

Problem

When you load a lot of nodes via WebService you receive an error "Maximum length exceeded".

Solution

Extend the maxJsonLength property, by adding the following section to your web.config file, at the configuration level, after the system.web node:

<system.web.extensions>
    <scripting>
        <webServices>

<jsonSerialization maxJsonLength="5000000" />
        </webServices>
    </scripting>
</system.web.extensions>


In this article