Reputation: 726
Trying to upload large files around 500 MB using asp.net mvc.
My web.config looks like below but I'm still getting the error on production server but its working on my local IIS (not IIS Express) :
<httpRuntime targetFramework="4.5" maxRequestLength="1048576" />
....
<system.webServer>
<security>
<requestFiltering>
<requestLimits maxAllowedContentLength="1048576000" />
</requestFiltering>
</security>
</system.webServer>
Upvotes: 1
Views: 2041
Reputation: 3964
Solution:
The quickest solution is to increase the upload size limit. IIS uses uploadReadAheadSize parameter in applicationHost.config and web.config files to control this limit.
Steps to change the value of this parameter:
Open IIS Manager
Select the site
Double click "Configuration Editor"
Select system.webServer and then serverRuntime
Modify the uploadReadAheadSize value
Click "Apply"
Upvotes: 1