</configuration>
<system.web.extensions>
<scripting>
<webServices>
<jsonSerialization maxJsonLength="#####"/>
</webServices>
</scripting>
</system.web.extensions>
</configuration>
在web.config添加以上配置。
問題來源:在本地調試ajax返回的數據沒有任何問題,但是發布到服務器上ajax返回500錯誤,想來想去還是服務端的問題。百度搜索了一下說是數據量返回太大!?。
在序列化為json格式時報錯。所以增加以上配置問題解決
