<system.web> <!-- 指示 ASP.NET 支持的最大文件上載大小。 該限制可用於防止因用戶將大量文件傳遞到該服務器而導致的拒絕服務攻擊。 指定的大小以 KB 為單位。默認值為 4096 KB (4 MB)。 此處改為40M大小的文件上傳限制。 --> <httpRuntime targetFramework="4.5" requestValidationMode="2.0" maxRequestLength="2097151" executionTimeout="120" /> </system.web>
<!--請求篩選模塊被配置為拒絕超過請求內容長度的請求--> <system.webServer> <security> <requestFiltering > <requestLimits maxAllowedContentLength="2147483647" ></requestLimits> </requestFiltering> </security> </system.webServer>
參考資料:
