Return large string from ajax call using Jquery to Web Method of ASP.NET Return large string from ajax call using Jquery to Web Method of ASP.NET asp.net asp.net

Return large string from ajax call using Jquery to Web Method of ASP.NET


Most probably you have exceeded MaxJsonLength, by default it is 102400 characters and your string is bigger. You can increase this limit in web.config:

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