In IIS, the maximum request size is 4Mb. If you try to upload a file one byte larger, you will get a 404 error.
You need to modify the request limits to allow for larger file uploads. That means modifying your
file in two places:
<httpRuntime maxRequestLength="10240" />
<requestLimits maxAllowedContentLength="1048576" />
The setting under
is in kilobytes
, whereas the one under
is in bytes
. So to make them match, the second needs to be equal to
× the first.
With this config in place, you will be able to upload files up to 10Mb. If you need to support larger files, then increase the values - you can set any value up to approximately 2Gb.