zoukankan      html  css  js  c++  java
  • IIS 7 中设置文件上传大小限制设置方法

    在IIS 6.0中设置文件上传大小的方法,就是配置如下节点:

       1: <system.web>
       2:       <httpRuntime maxRequestLength="1048576" executionTimeout="600"/>        
       3:     </system.web>

    但在IIS7中,设置如上设置后,不管设置多大数值,最大上传了限制为30M

    还要进行如下设置才能正确:

    方法1:

    appcmd set config "My Site/MyApp" -section:requestFiltering -requestLimits.maxAllowedContentLength:104857600 -commitpath:apphost

    在IIS服务器的命令行执行如上命令,注意修改上面的网站名称和上传文件大小

    方法2:

    在web.config中加入如下配置:

       1: <system.webServer>
       2:     <security>
       3:       <requestFiltering>
       4:         <requestLimits maxAllowedContentLength="1048576000"></requestLimits>
       5:       </requestFiltering>
       6:     </security>
       7:   </system.webServer>

    以下方法是不正确或不好的方法

    网上还有很多方法要去修改:“C:\Windows\System32\inetsrv\config\schema\IIS_schema.xml”文件,但这样确实能做到,但如果在系统安装补丁时,有可能对这个文件进行覆盖,让设置失败;

    另外,也有说修改:

    image

  • 相关阅读:
    android如何播放资源文件夹raw中的视频
    android studio添加三方jar包
    golang自动导入postgresql脚本
    xorm使用pgsql的例子
    python安装psycopg2
    制作u盘启动的工具
    codis须知
    redis3.0自带集群配置
    keepalive配置db层的ha的一些注意点
    phalcon安装笔记
  • 原文地址:https://www.cnblogs.com/LifelongLearning/p/2278247.html
Copyright © 2011-2022 走看看