# IQS內部文件 ## 摘要 Drive 檔案上傳與下載最大容量限制設定 以下說明如何調高/降低最大上傳/下載的容量限制 ## 前情提要 * 檔案上傳大小上限為 IIS 設定,可參考[官方說明](https://docs.microsoft.com/zh-tw/previous-versions/e1f13641(v=vs.110)?fbclid=IwAR2ngn5bP9uyRAcN_Q1XB0RuLuzL_ujT0lqwlRRFiIfDQK8WnPCf6m63JF0) ## 調整上傳檔案大小限制 ### 步驟 1 IIS 找到drive站台 > `要求篩選` > `編輯功能設定` > `允許的內容長度上限` 改為 指定的大小限制 ( 如:100MB 則填 `104857600` )  ### 步驟 2 修改 drive 的 webconfig 設定加入 ``` <httpRuntime targetFramework="4.5" maxRequestLength="102400" executionTimeout="3600" appRequestQueueLimit="10000" requestValidationMode="4.5" enableVersionHeader="false"/> ``` 補充資料: | 名稱 | 說明 | |-----|----| |maxRequestLength|最檔案大限制 (計算單位是 kilobytes)| |executionTimeout|ASP.NET 可執行的時間長度,以秒數為單位| |appRequestQueueLimit |當佇列的要求數目超過此設定所加加的限制時,傳入的要求將會遭到拒絕,並出現「503 - 伺服器太忙碌」錯誤。| |requestValidationMode|一個值,表示要使用哪一種 ASP.NET 版本特定驗證方法。 預設值為 4.5。| |enableVersionHeader|是否隱藏asp.net的版本號碼| ### 步驟 3 修改 drive 的 webconfig 設定加入 請於指定大小 填入指定的檔案大小上限值 ( 如:100MB 則填 `104857600` ) ``` ... <security> <requestFiltering> <requestLimits maxAllowedContentLength="指定大小" /> </requestFiltering> </security> </system.webServer> ``` ### 步驟 4 完成以上步驟 **請重啟站台** ## 參考文件 https://sdwh.dev/posts/2021/06/IIS-File-Upload-Limit-MaxRequestLength-MaxAllowedContentLength/
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up