[英]Uploading Large File in C# & ASP.NET MVC
我正在嘗試使用 C# 和 ASP.NET MVC 上傳文件,但出現此錯誤:
HTTP 錯誤 413.1 - 請求實體太大
請求過濾模塊,用於拒絕超過請求內容長度的請求。
這就是我配置web.config
的方式:
<system.web>
<authentication mode="None"/>
<compilation debug="true" targetFramework="4.7.2"/>
<httpRuntime targetFramework="4.7.2" executionTimeout="3600" maxRequestLength="104857600" enable="true"/>
</system.web>
For IIS7 and above, you also need to add the lines below: <system.webServer> <security> <requestFiltering> <requestLimits maxAllowedContentLength="1073741824" /> </requestFiltering> </security> </system.webServer>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.