C # Maximum request length exceeded. The cause of the error, and the resolution.

Source: Internet
Author: User
Tags stack trace
Error Description

Server error

500-Internal server error.

There is a problem with the resource you are looking for and cannot be displayed.

Server Error in '/' Application.

Maximum request length exceeded.

Description: An unhandled exception occurred during the execution to the current Web request. Please review the "stack Trace for" 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 is 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 () +8895175

System.Web.HttpRequest.FillInFormCollection () +403

System.Web.HttpRequest.get_Form () +68

System.Web.HttpRequest.get_HasForm () +8896111

System.Web.UI.Page.GetCollectionBasedOnMethod (Boolean dontreturnnull) +97

System.Web.UI.Page.DeterminePostBackMode () +69

System.Web.UI.Page.ProcessRequestMain (Boolean includestagesbeforeasyncpoint, Boolean includestagesafterasyncpoint ) +135

Version Information: Microsoft. NET Framework version:4.0.30319; asp.net version:4.0.30319.1

Error Reason: This error is caused because the application maximum request byte length exceeds the default request byte length Solution: You can add the following configuration to Web.config:

<system.web> Add the following sentence below. It's done.

or add the following paragraph can also be resolved.

executiontimeout= "1200"
Maxrequestlength= "102400"
Usefullyqualifiedredirecturl= "false"
Minfreethreads= "8"
Minlocalrequestfreethreads= "4"
apprequestqueuelimit= "100"

/>

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.