zoukankan      html  css  js  c++  java
  • IIS7上传文件大小設定

    1、首先、修改Web.Config中的maxRequestLength、单位是KB;executionTimeout单位是秒。例:maxRequestLength=1024(1MB)executionTimeout=3600(60分)  <system.web>
        <httpRuntime maxRequestLength="2097151" executionTimeout="3600"/>
      </system.web>
    2、上面设定好后、Web.Config的maxAllowedContentLength也必须要设定。单位:Byte、下面的例子设定大小为:1G。
      <system.webServer>
        <security>
          <requestFiltering>
            <requestLimits maxAllowedContentLength="1024000000"></requestLimits>
          </requestFiltering>
        </security>
      </system.webServer>
    注意:要使2的設定生效,要确保C:WindowsSystem32inetsrvconfigapplicationhost.config中的下面的节点为“Allow”。
    modify the overrideModeDefault from "Deny" to "Allow" like so:
    <sectionGroup name="system.webServer">
         <section name="requestFiltering" overrideModeDefault="Allow" />
    </sectionGroup>

    3、上面2的设定只针对一个Web站点,需设定所有IIS的站点的话,可以修改C:WindowsSystem32inetsrvconfigapplicationhost.config的maxAllowedContentLength节点。
    设定的方法和2是一样的。

    注意:上面的1,2就能够完成文件大小的限制设定了,一般不会去设定3的步骤。

  • 相关阅读:
    跨域请求页面跳转
    media query学习笔记
    JSONP跨域数据调用
    【转】轮询、长轮询、iframe长连接、web socket
    [转]node.js学习笔记(二)
    【转】require.js学习笔记(二)
    【转】require.js学习笔记(一)
    计算星期
    确定母亲节
    计算时钟的夹角
  • 原文地址:https://www.cnblogs.com/xiashengwang/p/3335309.html
Copyright © 2011-2022 走看看