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

推荐订阅源

G
Google Developers Blog
人人都是产品经理
人人都是产品经理
腾讯CDC
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
WordPress大学
WordPress大学
S
SegmentFault 最新的问题
小众软件
小众软件
B
Blog
博客园 - 叶小钗
Microsoft Azure Blog
Microsoft Azure Blog
Apple Machine Learning Research
Apple Machine Learning Research
A
About on SuperTechFans
J
Java Code Geeks
Blog — PlanetScale
Blog — PlanetScale
博客园 - 司徒正美
博客园 - 【当耐特】
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Recent Announcements
Recent Announcements
宝玉的分享
宝玉的分享
Martin Fowler
Martin Fowler
Hugging Face - Blog
Hugging Face - Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Last Week in AI
Last Week in AI
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" 

    />