Thursday, March 29, 2012

Maximum HTTP Request Size

I have a page that allows a user to copy the HTML of their resume into a third party control from Telerik that edits HTML. Problem is that if a user copies in a TON of HTML it crashes and sends the following error. What is the maximum size??

Maximum request length exceeded.

Description:An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details:System.Web.HttpException: Maximum request length exceeded.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:
[HttpException (0x80004005): Maximum request length exceeded.] System.Web.HttpRequest.GetEntireRawContent() +3220301 System.Web.HttpRequest.FillInFormCollection() +113 System.Web.HttpRequest.get_Form() +65 System.Web.HttpRequest.get_HasForm() +57 System.Web.UI.Page.GetCollectionBasedOnMethod(Boolean dontReturnNull) +2022801 System.Web.UI.Page.DeterminePostBackMode() +60 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +133


Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.42

Hi,

the normal amount of formdata that's allowed is 4Mb by default. You can change this setting in the web.config by increasing the number of the maxRequestLength attribute in the<httpRuntime> element.

Grz, Kris.

No comments:

Post a Comment