dotnet webservice处理数据量过大,ajax请求返回500错误解决方案

ajax请求webservice返回json数据,数据规模过大时ajax请求会得到500的响应,webservice+ajax处理大规模的数据需要在web.config中进行如下配置:

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

注:####为指定上限值

原文地址:https://www.cnblogs.com/wangyunjie/p/5802868.html