C# WebApi Post上传文件大小限制
原创
©著作权归作者所有:来自51CTO博客作者蓝创精英团队的原创作品,请联系作者获取转载授权,否则将追究法律责任
需要修改两个地方
一般都在 web.config里
<configuration>
<system.web>
<httpRuntime maxRequestLength="102400" executionTimeout="200" enable="true" />
</system.web>
<system.webServer>
<security>
<requestFiltering>
<requestLimits maxAllowedContentLength="104857600" />
</requestFiltering>
</security>
</system.webServer>
</configuration>
需要修改这两个文件
第一个文件的单位是 kb 也就是100M
第二个文件的单位是 byte 也是100M