上傳檔案大小的限制 iis7

錯誤:要求篩選模組設定為拒絕超過要求內容長度的要求。


iis7前上傳檔案大小的限制是在 web.config 的 maxRequestLength 屬性
maxRequestLength:上傳檔案長度,預設4mb,單位kb



executionTimeout:上傳時間,預設90秒,單位秒
<system.web>
 <httpRuntime maxRequestLength="102400" executionTimeout="300"/>
</system.web>


IIS 7.0 上又多了一個 maxAllowedContentLength 屬性 (單位為 Byte)

1073741824  = 1024 MB *1024*1024 bytes

<system.webServer>
    <security>
        <requestFiltering>
            <requestLimits maxAllowedContentLength="1073741824" />
        </requestFiltering>
    </security>
</system.webServer>

其預設值為 30000000 Bytes (~28.6 MB)


留言

這個網誌中的熱門文章

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

net use 系統發生 1219 錯誤