zoukankan      html  css  js  c++  java
  • IIS文件上传大小修改配置说明

    原因:Web 服务器上的请求筛选被配置为拒绝该请求,因为内容长度超过配置的值(IIS 7 默认文件上传大小时30M)。

    解决:IIS7更改asp.net文件上传大小限制

    步骤如下:

        1. 1.    修改IIS7applicationhost.config配置

    位置: C:WindowsSystem32inetsrvconfigapplicationhost.config

    找到<requestFiltering>节点,该节点下默认没有 <requestLimits maxAllowedContentLength="上传大小的值(单位:byte)" /> 元素。为这个节点添加如下元素:<requestLimits maxAllowedContentLength="209715200" />  (上传的大小将改为200M) 

    算法:200*1024*1024 = 209715200

        <requestLimits maxAllowedContentLength="209715200" ></requestLimits>
                </requestFiltering>

            </security>

    如果是IIS6,还需要修改c:windowssystem32inetsrv下的metabase.xml文件

    调整AspMaxRequestEntityAllowed属性为相同的值.

    调整前要先停止站点

    2、web.config中,添加如下内容

    找到maxRequestLength节点,修改其值,如没有,添加如下内容

    <configuration>
      <system.web>
         <httpRuntime maxRequestLength="204799" executionTimeout="120"/>
      </system.web>
    </configuration>

    3. web.config中,把以下内容加在<system.webServer>节点

    <system.webServer>

            <security>

                <requestFiltering>

                    <requestLimits maxAllowedContentLength="209715200" />

                </requestFiltering>

            </security>      

        </system.webServer>

    4、修改web.configUpFileLength大小为204800

     <add key="UpFileLength" value="204800"/>

    附件

     http://files.cnblogs.com/files/KingUp/IIS%E4%B8%8A%E4%BC%A0%E9%99%84%E4%BB%B6%E5%A4%A7%E5%B0%8F%E9%99%90%E5%88%B6%E4%BF%AE%E6%94%B9.rar

  • 相关阅读:
    如何描述一个前端开发程序员
    解决电脑性能一般,打开webstorm后,电脑比较卡的问题
    HTML5的5个的新特性
    js 数组的拼接
    移动端性能
    如何学习前端
    实战:上亿数据如何秒查
    读懂Java中的Socket编程
    远程管理软件
    dedecms 安装后 管理后台ie假死 无响应的解决方法
  • 原文地址:https://www.cnblogs.com/KingUp/p/5741271.html
Copyright © 2011-2022 走看看