zoukankan      html  css  js  c++  java
  • Maximum request length exceeded

    今天用户反映,Gridview无法导出Excel,一些电脑出现"Maximum request length exceeded"错误, 

    Server Error in '/' Application.


    Maximum request length exceeded.

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.Web.HttpException: Maximum request length exceeded.

    Source Error:

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

    或是一些电脑导出时,网页无法显示,

    刚开始,Insus.NET还是想到是不是记录太多,超过Excel的限制65536条记录,它导出至Word也是出现同样的错误。这让Insus.NET想起asp.net上传文件时,也有大小的限制,难道导出文件也有这样限制吗?

    不管怎样,先去配置web.config:

    View Code
    <configuration>
        
    <system.web>       
            
    <httpRuntime maxRequestLength="102400" useFullyQualifiedRedirectUrl="true" minFreeThreads="8" minLocalRequestFreeThreads="4" appRequestQueueLimit="100" enableVersionHeader="true"/>
        
    </system.web>
    </configuration>

    程序终于正常跑了,整个报表有70多MB大小。

  • 相关阅读:
    SQL-----DML
    C#常见笔试题
    事务
    HTM5制作的闹钟
    InforPath获取当前用户
    邮件中的样式问题
    InforPath的几个基础性的东西
    代码读取InforPath内容并进行修改
    python操作mysql(4)--增删改查
    python操作mysql(3)--链接数据库
  • 原文地址:https://www.cnblogs.com/insus/p/2002489.html
Copyright © 2011-2022 走看看