webapi interface to upload large files

Through the interface or upload files WebApi MVC pattern, the total number of error

413 Request Entity Too Large IIS

404 service is not found

Solution:

clipboard

1. Locate the following node system.webSever increase in the web.config file, maxAllowedContentLenth file upload length

<security>

<requestFiltering>

<requestLimits maxAllowedContentLength="2147483648"></requestLimits>

</requestFiltering>

</security>

2. Set upload file size

<system.web>

<httpRuntime targetFramework="4.7.2" maxQueryStringLength="1204800" maxUrlLength="1409600" maxRequestLength="67108864" />

</system.web>

Guess you like

Origin www.cnblogs.com/smallidea/p/11906414.html