after submitting the form it is showing .
The page was not displayed because the request entity is too large. how to solve this problem. and why this problem may be occuring.
i have two image 1 is 26 kb and 2 is 26 kb. image max size is upto 50 kb.
what should be maxrequestlength set in web.config
maxRequestLength
Tuhin PaulPosted Feb 1, 2024, 3:24 PM
This error occurs when the total size of the form data (including images) exceeds the default maximum request size allowed by IIS (usually 4MB).
Increase maxRequestLength in web.config:
- Open your application's web.config file.
- Locate the system.web section.
- Add or modify the httpRuntime element as follows:
Set maxRequestLength to a value larger than the combined size of your images (consider a buffer for other form data).
Amit MohantyPosted Feb 1, 2024, 1:43 PM
Hey Sumit, have you also adjust the maxAllowedContentLength setting in the section of the IIS web.config file?
Jayraj ChhayaPosted Feb 1, 2024, 12:29 PM
Hi sumit sankpal,
Give some more details of the error or screenshot from the client.So we can check further
sumit sankpalPosted Feb 1, 2024, 11:46 AM
i have tried it . but when client is submitting the form it is saying The page was not displayed because the request entity is too large.
Jayraj ChhayaPosted Feb 1, 2024, 11:13 AM
he "413 Request Entity Too Large" error occurs when the size of the request entity exceeds the maximum allowed limit. This limit is set by the server and can be adjusted to accommodate larger requests. In the case of ASP.NET applications, the
maxRequestLengthattribute in theweb.configfile controls the maximum allowed size of a request.To solve this problem, you need to increase the value of the
maxRequestLengthattribute in theweb.configfile. The value is specified in kilobytes (KB). For example, if you want to allow a maximum request size of 10 MB, you can set themaxRequestLengthattribute to 10240 (10 MB * 1024 KB/MB).Here's an example of how to set the
maxRequestLengthattribute in theweb.configfile: