Problem
When you attempt to upload a large file using Web API v3 UploadFile syntax, you receive the following error:
HTTP Status 413: Request Entity Too Large.
Solution
You can resolve this by increasing the following system parameters to allow the upload of files with a large number of records:
-
Open IIS Manager.
-
In the Connections pane, expand the Sites node, and select the site.
-
Select Features View, and in the Management section, click Configuration Editor.
-
Select system.web > httpRuntime and increase the values for following parameters:
-
executionTimeout
-
maxQueryStringLength
-
maxRequestLength
-
-
In the Connections pane, expand the Sites node, and select [sitename]FileService.
-
Repeat steps 3 - 4.
After saving those settings you do the following:
-
In the Connections pane, expand the Sites node, and select your site.
-
Select Features View, and in the IIS section, click Request Filtering.
-
In Actions pane, click Edit Feature Settings, and increase the values for the following parameters:
-
Maximum allowed content length (Bytes)
-
Maximum URL length (Bytes)
-