jQuery Ajax 请求报长度过长的错误:Error during serialization or deserialization using the JSON JavaScriptSerializer

 {"Message":"Error during serialization or deserialization using the JSON JavaScriptSerializer. The length of the string exceeds the value set

 

在web项目的web.config <configuration>节下增加

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

 

另外如果 web项目 请求WCF服务长度过长报错的话

 

在web.config  <system.web>节下增加

<httpRuntime maxRequestLength="250000"/>

 

 

 

jQuery Ajax 请求报长度过长的错误:Error during serialization or deserialization using the JSON JavaScriptSerializer,布布扣,bubuko.com

文章来自:http://www.cnblogs.com/hbhzz/p/3781528.html
© 2021 jiaocheng.bubufx.com  联系我们
ICP备案:鲁ICP备09046678号-3