locked
Upload 400MB file time out Aborted RRS feed

  • Question

  • User457850011 posted

    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" />


    <security>
    <requestFiltering>
    <requestLimits maxAllowedContentLength="419430400" />
    </requestFiltering>
    </security>

    Monday, September 16, 2019 6:26 PM

Answers

  • User457850011 posted

    Hi Kathy

    I have managed to get it working by doing as follows

    <security>
    <requestFiltering>
    <requestLimits maxAllowedContentLength="4294967295" />
    </requestFiltering>
    </security>

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, September 17, 2019 3:37 PM
  • User409696431 posted

    I'm glad you got it working.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, September 17, 2019 5:00 PM

All replies

  • User409696431 posted

     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:

    <system.webServer>

    ...

    <security >

    <requestFiltering>

    <requestLimits maxAllowedContentLength="4194304000000" />  (note the different units from maxRequestLength)

    </requestFiltering>

    </security>

    </system.webServer>

    If you are using IIS8.5, use IIS Manager, find your site, and use Configuration Manger to modify uploadReadAheadSize:

    1. Launch "Internet Information Services (IIS) Manager"
    2. Expand the Server field
    3. Expand Sites
    4. Select the site you want to make the modification for.
    5. In the Features section, double click "Configuration Editor"
    6. Under "Section" select: system.webServer>serverRuntime
    7. Modify the "uploadReadAheadSize" section
    8. Click Apply

    If this doesn't help, a third party file upload control would be a good option.

    Tuesday, September 17, 2019 5:13 AM
  • User-17257777 posted

    Hi denkyira,

    Have you tried other browsers, such as chorme, will this issue happen in other browsers?

    Best Regards,

    Jiadong Meng

    Tuesday, September 17, 2019 6:20 AM
  • User753101303 posted

    Hi,

    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 ???

    Tuesday, September 17, 2019 8:37 AM
  • User457850011 posted

    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

    Tuesday, September 17, 2019 10:20 AM
  • User457850011 posted

    Good Day

    The exact message is Http Aborted. I am able to upload up to 268 MB. Anything above this figure fails

    Tuesday, September 17, 2019 10:22 AM
  • User457850011 posted

    Hi Kathy

    I have managed to get it working by doing as follows

    <security>
    <requestFiltering>
    <requestLimits maxAllowedContentLength="4294967295" />
    </requestFiltering>
    </security>

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, September 17, 2019 3:37 PM
  • User753101303 posted

    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).

    Tuesday, September 17, 2019 3:56 PM
  • User457850011 posted

    Hi Pat

    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

    Tuesday, September 17, 2019 4:26 PM
  • User409696431 posted

    I'm glad you got it working.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, September 17, 2019 5:00 PM