栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 面试经验 > 面试问答

ASP.NET的JSON最大长度问题

面试问答 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

ASP.NET的JSON最大长度问题

我也有同样的问题。看到3.5和4.0解决方案感到沮丧。事实证明,您执行相同的操作,只需

<ConfigSections>
在Web.config中的标记中添加几行即可。粘贴时,它应该是根目录下的第一个元素。

<configSections>    <sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">        <sectionGroup name="scripting" type="System.Web.Configuration.scriptingSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"> <sectionGroup name="webServices" type="System.Web.Configuration.scriptingWebServicesSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">     <section name="jsonSerialization" type="System.Web.Configuration.scriptingJsonSerializationSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false"/> </sectionGroup>        </sectionGroup>    </sectionGroup></configSections>

然后添加实际

<system.web.extensions>
部分:

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


转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/427632.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号