IIS 10 - HTTP Error 413.1 - Request Entity Too Large
Asked Answered
E

3

7

I am having an issue posting a large file using IIS 10 and .Net. The error code i receive is from IIS:

HTTP Error 413.1 - Request Entity Too Large
The request filtering module is configured to deny a request that exceeds the request content length.

I found many solutions online that are not working. Here are the changes i have made to IIS. These changes were done under the default website which hosts the application where i'm having this issue. The changes made to the default website have propagated to all the sites contained within.

enter image description here

enter image description here

enter image description here

I have also set the uploadReadAheadSize to 2147483647:

enter image description here

The file i am attempting to upload is 97 MB. What am i missing?

Elyse answered 7/5, 2021 at 16:31 Comment(1)
did find the solution to this issue? If so, could you post an answer?Religieuse
V
13

Set the uploadReadAheadSize value in the configuration file, here are the steps:

  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.
Vertumnus answered 10/5, 2021 at 1:55 Comment(2)
Thank you for your response. I already had uploadReadAheadSize set to 2147483647 but forgot to include that in my initial message.Elyse
To ensure that these operations are successfully applied to your application, you should click on the application you deployed in IIS and then select the corresponding component to modify the configuration.Vertumnus
D
1

I have the same problem, after add:maxReceivedMessageSize value in Web.config fix my problem.

  <webHttpBinding>
    <binding name="default" maxReceivedMessageSize="2147483647">
      <security mode="TransportCredentialOnly">
        <transport clientCredentialType="Windows" proxyCredentialType="Windows" />
      </security>
      <readerQuotas maxDepth="2147483647"
                maxStringContentLength="2147483647"
                maxArrayLength="2147483647"
                maxBytesPerRead="2147483647"
                maxNameTableCharCount="2147483647" />
    </binding>
  </webHttpBinding>
Dylan answered 29/5, 2024 at 21:30 Comment(0)
S
0

I had the same problem. I've fixed it by adding maxAllowedContentLength value to Web.config:

<security>
  <requestFiltering>
    <requestLimits maxAllowedContentLength="1073741824" /> <!-- 1 GB -->
  </requestFiltering>
</security>
Sanctity answered 10/7, 2024 at 9:26 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.