413 Request Entity Too Large – The page was not displayed because the request entity is too large.
This is the error I got when I tried to call the following service /odata/data/cases({caseId}) /workitems({workItemId})/next
How to fix it
The solution is to configure the Request length. There are two main places were you have to make the changes:
- IIS Request Filtering
- system.web/httpRuntime maxRequestLength
IIS Request Filtering
To do that, first thing open the Internet Information Services (IIS) Manager and navigate to your site application, under the Default Web Site. Select Request Filtering module and then Edit Feature Settings.
Set the Maximum allowed content length.
The maxAllowedContentLength determines the size of the POST buffer allowed in bytes.
Example
10 Megabytes (MB) = 10,485,760 Bytes (B)
15 Megabytes (MB) = 15,728,640 Bytes (B)
1 MB = 1,048,576 B ______ 1 B = 0.000001 MB
ASP.NET httpRuntime maxRequestLength
Next step, go back to your application and this time select the Configuration module.
From the Section dropdown select system.web/httRuntime.
Change the value for maxRequestLength. Note that this velue is specified in kilobytes.
Example
10 Megabytes (MB) = 10,240 KiloBytes (KB)
15 Megabytes (MB) = 15,360 KiloBytes (KB)
1 MB = 1,024 KB ______ 1 KB = 0.000977 MB
Leave a Reply