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

后端 未结 7 1888
时光取名叫无心
时光取名叫无心 2020-12-08 10:18

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.

相关标签:
7条回答
  • 2020-12-08 10:51

    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.

    0 讨论(0)
  • 2020-12-08 10:51

    I did the above but still had no joy.

    What fixed the problem for me was also upping the request limits: - Select site in IIS manager - Click "Edit feature settings" from right hand menu - Insert 200000000 for "Maximum allowed content length"

    0 讨论(0)
  • 2020-12-08 10:52

    I had the same error and the above fix did not work. I was only on HTTP (localhost) However this fixed the 413 error

    Set-WebConfigurationProperty -filter /system.webserver/security/requestfiltering/requestLimits -name maxAllowedContentLength -value 134217728
    
    0 讨论(0)
  • 2020-12-08 10:52

    In my case, the error occurred when downloading a file.

    The reason was, that I had a code that explicitely sends an HTTP 413 to the client in an (erroneous) case.

    (See here for details).

    So be aware of the fact that setting an HTTP response code 413 in your code (or in a library that you are using) also can generate the OP's error message.

    0 讨论(0)
  • 2020-12-08 10:53

    For me, uploadReadAheadSize did not fix my issue.

    I changed both of these settings in my asp.net web.config and finally the file uploaded for me:

    <system.web>
      <system.webServer
    <httpRuntime executionTimeout="999999" maxRequestLength="20000" requestValidationMode="2.0" /> <!-- 20 MB -->
    </system.web>
    

      <system.webServer>
       <security>
          <requestFiltering>
             <requestLimits maxAllowedContentLength="20500000" />  <!-- 20.5 MB - making it match maxRequestLength to fix issue with uploading 20mb file -->
          </requestFiltering>
       </security>   
      </system.webServer>
    
    0 讨论(0)
  • 2020-12-08 10:58

    Another possible cause is an Authentication setting. Within IIS7,

    1. Select the site under Default Web Site

    2. Select Authentication

    3. Select Windows Authentication and enable. Disable all others.

    4. While Windows Authentication is still selected, click on Advanced Settings in the Actions pane.

    5. Make sure Extended Protection is on Accept and check the Enable Kernel-mode authentication

    0 讨论(0)
提交回复
热议问题