user2370664
user2370664

Reputation: 423

IIS 10 - HTTP Error 413.1 - Request Entity Too Large

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?

Upvotes: 8

Views: 27127

Answers (3)

Sampath Sandaruwan
Sampath Sandaruwan

Reputation: 111

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>

Upvotes: 0

Amy Ren
Amy Ren

Reputation: 11

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>

Upvotes: 1

Theobald Du
Theobald Du

Reputation: 1024

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.

Upvotes: 13

Related Questions