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?

4

2 回答 2

3

查看 Jon Galloway 的这篇博客文章,它有点旧但仍然相关:
ASP.NET 中的大文件上传

它得到了您关于以下问题的答案:

  • 网页未找到
  • 设置正确的 maxAllowedContentLength

有关于您可以使用的各种控件的建议,包括免费和商业。
我用过闪光灯控制,效果很好。

替代解决方案
也为每个用户提供一个上传的 FTP 区域。
它允许用户:

  • 轻松批量上传许多文件(在浏览器中更难)
  • 利用断开连接时的恢复

然后,您为用户提供一个 GUI,以使用这些文件。

于 2012-08-08T08:40:27.043 回答
1

您是否考虑过使用 jQuery File Upload https://github.com/blueimp/jQuery-File-Upload/有适用于 .net 和 mvc 的版本(请参阅 git hub wiki)。它消除了在 .net 中实现大文件上传的所有心痛,并且还提供了一个可爱的界面。自从不久前发现这一点以来,我从未使用过其他任何东西!我现在已经成功实施了几次,并且看到上传 ~2GB 成功。

于 2012-08-08T08:47:36.430 回答