[IIS] IIS7.5、IIS8、IIS8.5 修改IIS預設上傳、下載檔案大小限制和時間限制


開啟網站的設定編輯器



方法一:
●設定上傳時間限制
   指定區段選擇 system.web\httpRuntime

設定:executiom Timeout 


●設定上傳大小限制
  指定區段選擇 system.webServer\secunity\requestFiltening
   選擇 requestFiltering maxAllowedContentLength
  (原本為30000000,即30M)

直接修改後即可生效,不需重新啟動IIS

方法二:
在網站根目錄建一個web.config檔案
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <security>
            <requestFiltering>
                <requestLimits maxAllowedContentLength="102400000" />
            </requestFiltering>
        </security>
    </system.webServer>
    <system.web>
        <httpRuntime executionTimeout="1800" maxRequestLength="104857600" />
    </system.web>
</configuration>
maxAllowedContentLength 單位為位元
executionTimeout 單位秒                  

留言

這個網誌中的熱門文章

[Windows]密碼複雜性需求 停用密碼複雜度

net use 系統發生 1219 錯誤