mvc以及mvc.core文件上传限制(host IIS)
mvc.net
需要修改Web.config 两处
(单位kb)
<system.web> <httpRuntime targetFramework="4.6.1" maxRequestLength="51200" executionTimeout="200" enable="true"/> </system.web>
(单位字节)
<system.webServer> <security> <requestFiltering> <requestLimits maxAllowedContentLength="52428800" /> </requestFiltering> </security> </system.webServer>
mvc.core
只要修改Web.config一处
(单位字节)
<system.webServer> <security> <requestFiltering> <requestLimits maxAllowedContentLength="52428800" /> </requestFiltering> </security> </system.webServer>