Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save rahulbagal/0d1992f9d4bd16b6b475695385bbd13e to your computer and use it in GitHub Desktop.
Save rahulbagal/0d1992f9d4bd16b6b475695385bbd13e to your computer and use it in GitHub Desktop.
Dotnet core - File upload size limit
I had a ASP.net MVC application written in dotnet core. When I was trying to upload a large file 50MB using a post request , it was giving resource not found error.
Applicatin was hosted on Azure WebApp ( Basic plan )
Actually the post request was larger than default post request.
Fix - Adding following section in web.config under <system.webServer> solved the issue . Now , it supports file upload upto ~ 300 MB
<!--Increase upload file size limit to 300 MB-->
<security>
<requestFiltering>
<requestLimits maxAllowedContentLength="300000000" />
</requestFiltering>
</security>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment