webapi接口上傳大文件


通過WebApi或者MVC模式的接口上傳文件時,總數報錯

413 Request Entity Too Large IIS

404 服務未找到

解決方法:

clipboard

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>


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM