Are you getting “Maximum request length exceeded” message when trying upload a file?

Customer care manager

Juraj Ondrus asked on November 17, 2009 16:17

Are you getting “Maximum request length exceeded” message when trying upload a file?

Correct Answer

Juraj Ondrus answered on November 17, 2009 16:17

This exception is thrown because incoming request is greater than allowed maximum request length. By default ASP.NET http runtime allows to receive requests that are not greater than 4 MB. This value can be increased by specifying maxRequestLength parameter of <httpRuntime> section of the configuration file (web.config).

1. Open the Web.config file in VS or Notepad.
2. Find the httpRuntime element in the system.web section as follows:

Example:

<httpRuntime
executionTimeout="90"
maxRequestLength="10000"/>
(increase the marked number of bytes)

More detail information about mentioned parameters can be found in Microsoft documentation or in this blog post as well.


0 votesVote for this answer Unmark Correct answer

   Please, sign in to be able to submit a new answer.