Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • William Charlton 171 posts 218 karma points
    Apr 15, 2014 @ 18:28
    William Charlton
    0

    Error trying to upload a large file

    I am building a site using Contour for a form where customers can upload files. These files can potentially be quite big.

    The first file I tested (about 190Mb) threw an error:

    HTTP Error 404.13 - Not Found
    The request filtering module is configured to deny a request that exceeds the request content length.

    I have increased web.config httpRuntime/maxRequestLength to 819200000 any bigger and it fails with an invalid  int32 error (the largest Int32 number is 2,147,483,647). I can now upload quite large files but still not  the 190Mb.

    I also noticed that Contour threw the error before checking that the mandatory fields were complete, surely there should be a client side check before submit??

    This raises some questions:

    1) 819,200,000 bytes = 781.25Mb so something else is restricting the upload - maybe the applicationhost.config?

    2) I appreciate 190 Mb is big and maybe I should restrict to say 50Mb anyway, but how?

    3) How can I trap Contour errors?

    4) Do I have something missing vis a vis client side validation or does it not exist?

     

  • William Charlton 171 posts 218 karma points
    Apr 15, 2014 @ 20:27
    William Charlton
    0

    I have fixed the upload problem (up to 1Gb which should be enough ;).

    On http://forums.asp.net/t/1919541.aspx?HTTP+Error+404+13+Not+Found I discovered that "maximumRequestLength is measured in kilobytes" so I had way enough size for my files but I also needed to add:

       <security>
          <requestFiltering>
             <!-- This will handle requests up to 1024MB (1GB) -->
             <requestLimits maxAllowedContentLength="1048576000" />
          </requestFiltering>
       </security>

    In the <system.webServer/> section

    I still want to limit the upload size and trap any errors though.

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies