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大小。

  • 相关阅读:
    Visual C#创建和使用ActiveX组件
    ASP.NET2.0 缓存(Cache)技术介绍
    轻松配置Win 2003自带Mail服务器
    如何打印IFRAME中的内容
    FAT32转NTFS、NTFS无损转FAT32
    使用设计模式构建通用数据库访问类
    笑到肚子痛
    夫妻的简单生活
    哈工大学子的一首强诗&哈工大才女的绝顶回诗
    相爱时要做的20件事
  • 原文地址:https://www.cnblogs.com/insus/p/2002489.html
Copyright © 2011-2022 走看看