5

My web application allows authorised users to upload videos using the ASP.NET WebForms FileUpload web control, which in the past have been around 100-200MB. I had to obviously make some changes to the web.config so that files of this size could be uploaded.

However, the authorised users now want to upload video files which are 500MB+

The maxAllowedContentLength has now been set to 629145600 (600MB).

However, when uploading the videos, after a while the page responds with:

Page not found

This only happens with large videos, so I know this issue has something to do with the file size.

Why is this happening? And also, should I really be increasing the limit to 500MB+? Is there a better way of getting such large files onto the web server?

Curtis
  • 101,612
  • 66
  • 270
  • 352
  • Are you using the standard asp upload control? My first guess is that your post size is massive irrespective of your limits and will be pushing the entire file into memory at some point. See http://stackoverflow.com/questions/1599409/upload-large-files1gb-asp-net or http://stackoverflow.com/questions/285120/upload-large-files-in-net?rq=1 for some suggestions. – dash Aug 08 '12 at 08:35
  • @dash Thanks for your reply. That's correct, I'm using ASP.NET WebForms with the `FileUpload` web control. – Curtis Aug 08 '12 at 08:36
  • Hi Curt, have we answered your question? – Ralph Willgoss Aug 09 '12 at 12:28

2 Answers2

3

Check out this blog post by Jon Galloway, its a bit old but still relevant:
Large file uploads in ASP.NET

Its got answers to your questions about:

  • page not found
  • setting the correct maxAllowedContentLength

There's recommendations for various controls you can use, both free and commercial.
I've used the flash control and it worked great.

Alternative Solution
Provide an FTP area for each user to upload too.
It allows users:

  • easily batch upload many files (harder in the browser)
  • takes advantage of resume on disconnect

Then you provide a GUI for the user, to consume the files.

Ralph Willgoss
  • 11,750
  • 4
  • 64
  • 67
  • 1
    Hi, yes you did thanks, your link was very useful. I've changed the `FileUpload` web control to use a third-party flash application which is now dealing with the uploads, and the issue appears to be resolved – Curtis Aug 09 '12 at 13:15
1

Have you considered using jQuery File Upload https://github.com/blueimp/jQuery-File-Upload/ there are versions available for .net and mvc (see the git hub wiki). It takes all the heart ache out of implementing large file uploads in .net and provides a lovely interface too. Since discovering this a while ago I never use anything else! I've successfully implmented a few times now and seen uploads ~2GB working successfully.

Luke Baughan
  • 4,658
  • 3
  • 31
  • 54