通過WebApi或者MVC模式的接口上傳文件時,總數報錯
413 Request Entity Too Large IIS
404 服務未找到
解決方法:
1. 在web.config文件下找到system.webSever 節點下面增加,maxAllowedContentLenth 文件上傳的長度
<security>
<requestFiltering>
<requestLimits maxAllowedContentLength="2147483648"></requestLimits>
</requestFiltering>
</security>
2. 設置上傳文件大小
<system.web>
<httpRuntime targetFramework="4.7.2" maxQueryStringLength="1204800" maxUrlLength="1409600" maxRequestLength="67108864" />
</system.web>