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

时间:2014-06-12 21:16:02   收藏:0   阅读:409

 {"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

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!