小编swp*_*til的帖子

字符串的长度超过maxJsonLength属性上设置的值

我正在通过jQuery的ajaxpost方法通过web方法加载标签内容数据,大约有200-300条记录.并在控制台中收到以下错误:

错误:Sys.Net.WebServiceFailedException:Sys.Net.WebServiceFailedException:System.InvalidOperationException--使用JSON JavaScriptSerializer进行序列化或反序列化时出错.字符串的长度超过maxJsonLength属性上设置的值.

maxJsonLength像这样在Web.config中更改属性的长度没有帮助.

<configuration> 
   <system.web.extensions>
       <scripting>
           <webServices>
               <jsonSerialization maxJsonLength="2147483644" />
           </webServices>
       </scripting>
   </system.web.extensions>
</configuration>
Run Code Online (Sandbox Code Playgroud)

谁能帮我解决这个问题?

asp.net jquery webmethod

25
推荐指数
3
解决办法
4万
查看次数

标签 统计

asp.net ×1

jquery ×1

webmethod ×1