Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

The page was not displayed because the request entity is too large on IIS

Tags:

redirect

c#

iis-7

I'm getting the following error while redirecting one page to another web page:

"the page was not displayed because the request entity is too large.".

The page from which I'm redirecting to another page contains a huge amount of data, so basically I know the cause of the issue.

However, I'm looking out for a working solution for this. Secondly, when I researched this issue I found such kind of problem generates when any large file gets uploaded.

But I'm not uploading any large file, its just the page itself contains large data. Prompt solution will be appreciated.

like image 483
Shilpa Soni Avatar asked Mar 31 '14 13:03

Shilpa Soni


People also ask

How do I fix page was not displayed because the request entity is too large?

Clear your Constant Contact cookies to fix the Request Entity Too Large error. Occasionally when navigating your account, you might see an error message that reads "Request Entity Too Large." When this happens, it means that your Constant Contact cookies have built up and need to be cleared.

What does it mean when a request entity is too large?

What does “413 Request Entity Too Large” mean? A 413 HTTP error code occurs when the size of a client's request exceeds the server's file size limit. This typically happens when a client attempts to upload a large file to a web server, and the server responds with a 413 error to alert the client.


2 Answers

I think this will fix the issue if you have SSL enabled:

Setting uploadReadAheadSize in applicationHost.config file on IIS7.5 would resolve your issue in both cases. You can modify this value directly in applicationhost.config.

  1. Select the site under Default Web Site

  2. Select Configuration Editor

  3. Within Section Dropdown, select "system.webServer/serverRuntime"

  4. Enter a higher value for "uploadReadAheadSize" such as 1048576 bytes. Default is 49152 bytes.

During client renegotiation process, the request entity body must be preloaded using SSL preload. SSL preload will use the value of the UploadReadAheadSize metabase property, which is used for ISAPI extensions

Reference.

like image 193
JoshYates1980 Avatar answered Sep 17 '22 18:09

JoshYates1980


I got it working by doing the following

  1. Go to IIS.
  2. Click on the server name
  3. In the features (icons), chose the configuration editor.
  4. Click on the dropdowns on the top with Settings
  5. Traverse the path system.webServer -> security -> requestFiltering -> maxAllowedContentLength and set it to 334217728. (Then hit enter and then apply on the top right).

You can also restart the webserver for good measure. After that I could upload my 150k database to phpymyadmin.

I also set post_max size to 8000 in php.ini in programs/PHP/phpversion/php.ini

It may be overkill for the sizes but it gets the job done when you've got big files.

like image 30
The Skilled Family Avatar answered Sep 19 '22 18:09

The Skilled Family