Dot-Net

移除 IIS express 的 30MB 上傳限制

  • August 14, 2012

有誰知道如何取消 30MB 上傳限制,特別是針對 IIS Express?

我試過編輯 applicationhost.config 和

<security>
     <requestFiltering>
       <requestLimits maxAllowedContentLength="1050000"></requestLimits>
     </requestFiltering>
   </security>

<location path="api/media/AsyncUpload">
   <system.web>
     <httpRuntime maxRequestLength="1050000" /> 
<!-- The size specified is in kilobytes. The default is 4096 KB (4 MB). 1gb = 1048576 -->
       </system.web>
     </location>

似乎設置正確?

有任何想法嗎?

您應該更改伺服器配置文件。您正在尋找的領域是

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

如果它不存在,添加它應該覆蓋預設值。

引用自:https://stackoverflow.com/questions/11961590