Last post Sep 17, 2019 05:00 PM by KathyW
Sep 16, 2019 06:26 PM|denkyira|LINK
I am using asp.net mvc 5 to upload files with maximum value set to 400MB. For some reasons I can only upload 268MB and anything above this gets aborted in IE. Below is my web config settings. Any help would be appreciated.
<httpRuntime targetFramework="4.5" maxRequestLength="419430400" executionTimeout="9600" requestLengthDiskThreshold="419430400" />
<requestLimits maxAllowedContentLength="419430400" />
Sep 17, 2019 05:13 AM|KathyW|LINK
For a file that large a 3rd party control that can chunk the file and pause/resume is really needed.
However, if you do want to try without a third party control.... Are you using IIS7? If so, there is another place to make changes:
<requestLimits maxAllowedContentLength="4194304000000" /> (note the different units from maxRequestLength)
If you are using IIS8.5, use IIS Manager, find your site, and use Configuration Manger to modify uploadReadAheadSize:
If this doesn't help, a third party file upload control would be a good option.
Sep 17, 2019 06:20 AM|jiadongm|LINK
Have you tried other browsers, such as chorme, will this issue happen in other browsers?
Sep 17, 2019 08:37 AM|PatriceSc|LINK
The exact error message could help to better understand which kind of timeout you are seeing (maybe a proxy or whatever ???). It happens after how much time ?
Or do you see really a timeout message or is this really a size limit ???
Sep 17, 2019 10:20 AM|denkyira|LINK
Good Day Kathy
I am using IIS7.5 and tried changing to use <requestLimits maxAllowedContentLength="4194304000000" /> (note the different units from maxRequestLength)
Now getting Object reference not set to an instance of an object. error
Sep 17, 2019 10:22 AM|denkyira|LINK
The exact message is Http Aborted. I am able to upload up to 268 MB. Anything above this figure fails
Sep 17, 2019 03:37 PM|denkyira|LINK
I have managed to get it working by doing as follows
<requestLimits maxAllowedContentLength="4294967295" />
Sep 17, 2019 03:56 PM|PatriceSc|LINK
You are really sure it was 238 Mb for all 5 files? Do you have additional hidden form fields and/or you are using base64 ?
I would do the same test again and would check the actual request size. For now it seems you have to set the limit to 4 Gb so that it works for uploading 238 Mb ??? (or could it be that you have to start/sto the site to take a new limit into account).
Sep 17, 2019 04:26 PM|denkyira|LINK
I have it working correctly. In fact my actual problem was the executionTimeout which I have pushed it up to 7200 and corrected the maxRequestLength to 409600
Sep 17, 2019 05:00 PM|KathyW|LINK
I'm glad you got it working.