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

  • 相关阅读:
    Django url
    Django 命令
    MVC和MTV模式
    pymysql操作
    mysql 基本操作
    jquery基本操作
    外边距内边距
    css
    Html
    __name__ __main__ 作用
  • 原文地址:https://www.cnblogs.com/xielong/p/7565444.html
Copyright © 2011-2022 走看看