Reputation: 423
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.
I have also set the uploadReadAheadSize to 2147483647:
The file i am attempting to upload is 97 MB. What am i missing?
Upvotes: 8
Views: 27127
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
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
Reputation: 1024
Set the uploadReadAheadSize value in the configuration file, here are the steps:
Upvotes: 13