zoukankan      html  css  js  c++  java
  • 怎样解决IIS6.0上传文件限制的问题?

    我们用IIS发布的Bs项目,如果进行文件上传,在上传文件的时候,无法上传文件大小超过4M的文件

    设置文件上传大小的方法,就是修改项目的web.config配置

    在项目中的web.config文件中,添加如下节点

     <system.web>
        <!-- maxRequestLength:解决上传文件4M限制 -->
        <httpRuntime maxRequestLength="999999" executionTimeout="50000"   />   
     </system.web>

    那么在IIS7.0这样设置后,无论maxRequestLength多大, 最大只能30M, 还要配置一下

    在web.config添加如下配置

     <system.web>
        <!-- maxRequestLength:解决上传文件4M限制 -->
        <httpRuntime maxRequestLength="999999" executionTimeout="50000"   />   
     </system.web>

    在加上

    <system.webServer>
         <security>
              <requestFiltering>
              <requestLimits maxAllowedContentLength="1048576000" />
              </requestFiltering>
         </security>
     </system.webServer> 

    Ps:

    IIS6.0 设置上传文件超过限制(4M),已解决本人上传文件限制问题,IIS7.0方法未测试,来源于:

    http://www.cnblogs.com/LifelongLearning/archive/2011/12/06/2278247.html

  • 相关阅读:
    CF547D Mike and Fish
    CF147B Smile House
    [BJOI2017]树的难题
    AT2306 Rearranging
    复利计算器--单元测试
    操作系统 实验1 命令解释程序的编写
    个人项目耗时对比记录表
    复利计算器3.0
    0320记《构建之法》读后感
    复利计算实验总结
  • 原文地址:https://www.cnblogs.com/xielong/p/7565444.html
Copyright © 2011-2022 走看看