惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Microsoft Security Blog
Microsoft Security Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
A
About on SuperTechFans
月光博客
月光博客
Jina AI
Jina AI
F
Fortinet All Blogs
博客园 - 聂微东
The Cloudflare Blog
美团技术团队
B
Blog RSS Feed
N
Netflix TechBlog - Medium
罗磊的独立博客
The GitHub Blog
The GitHub Blog
I
InfoQ
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Apple Machine Learning Research
Apple Machine Learning Research
H
Help Net Security
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
T
The Blog of Author Tim Ferriss
MyScale Blog
MyScale Blog
博客园 - 三生石上(FineUI控件)
宝玉的分享
宝玉的分享
阮一峰的网络日志
阮一峰的网络日志
V
V2EX

博客园 - 大白鲨

javascript的数组使用方法 - 大白鲨 - 博客园 asp.net操作Excel拒绝访问的解决 利用javascript判断浏览器是否已经安装ActiveX控件和是否禁止运行ActiveX控件 IIS错误Server Application Error(http 500 错误)解决办法 SQL Server的SQL技巧 ASP.NET 2.0 实现多文件上传 网络MSDTC配置方法 visual studio 2005包加载失败的解决办法 Office Excel 2003找不到安装文件sku011.cab的解决办法 delphi连接DCOM的安全配置 Atlas中对DataTable操作的脚本 去掉asp.net2.0的树控件刷新功能 通过Web Services上传和下载图片文件 IIS 5.0错误解决集锦 访问IIS时返回的状态代码解释参考 使用UDPClient 编写聊天程序 Windows安全配置技术 为IIS配置安全的发布方法 SQL Server中各个系统表的作用
"Maximum length exceeded"错误的解决办法 - 大白鲨
大白鲨 · 2008-01-24 · via 博客园 - 大白鲨
   

只要修改web.config,在<microsoft.web> <scripting><webServices>中定义一下他的长度到足够大就可以了。比如:

<jsonSerialization maxJsonLength="500000"></jsonSerialization>

如:

<system.web.extensions>

       <scripting>

           <webServices>

        <jsonSerializationmaxJsonLength="10240000">

          <!--<converters>

            <add name="WebService" type="System.Web.Services.WebService"/>

          </converters>-->

        </jsonSerialization>

              <!-- Uncomment this line to customize maxJsonLength and add a custom converter -->

              <!--

      <jsonSerialization maxJsonLength="500">

        <converters>

          <add name="ConvertMe" type="Acme.SubAcme.ConvertMeTypeConverter"/>

        </converters>

      </jsonSerialization>

      -->

              <!-- Uncomment this line to enable the authentication service. Include requireSSL="true" if appropriate. -->

              <!--

        <authenticationService enabled="true" requireSSL = "true|false"/>

      -->

              <!-- Uncomment these lines to enable the profile service. To allow profile properties to be retrieved

           and modified in ASP.NET AJAX applications, you need to add each property name to the readAccessProperties and

           writeAccessProperties attributes. -->

              <!--

      <profileService enabled="true"

                      readAccessProperties="propertyname1,propertyname2"

                      writeAccessProperties="propertyname1,propertyname2" />

      -->

           </webServices>

           <!--

      <scriptResourceHandler enableCompression="true" enableCaching="true" />

      -->

       </scripting>

    </system.web.extensions>

上面设置了:<jsonSerializationmaxJsonLength="10240000">

这是解决ajax传输字节数大于默认值时的设置。

如果对于页面出错配置如下:

<httpRuntime    

     executionTimeout="1200"    

     maxRequestLength="102400"    

     useFullyQualifiedRedirectUrl="false"    

     minFreeThreads="8"     

     minLocalRequestFreeThreads="4"    

     appRequestQueueLimit="100" 

    />