Uploading files greater than 2GB in ASP.NET MVC 3

和自甴很熟 提交于 2019-12-01 16:27:07

问题


I am trying to upload video files larger than 2GB on an ASP.NET MVC 3 project however the maximum file upload size for ASP.NET 4.0 seems to be at 2GB. Is there a way to exceed this limitation in ASP.NET/IIS? or what would another approach be to get around this?

I am also using uploadify as my file upload control. Any help and resources for achieving this appreciated.

Cheers


回答1:


According to my experience there is no way to upload file over 2Gb in a single request. There is a 2Gb limitation in IIS, and there is no workaround.

In .Net 4.0 and earlier there were also a 2Gb (some people say 4Gb) limitation in ASP.NET, that was fixed in .Net 4.5. However this fix makes a little sense because IIS itself does not support file uploads over 2Gb.

The only way to upload files over 2Gb to IIS-hosted server is to break it into pieces and upload piece by piece. Here are clients that can upload breaking a file into segments:

  1. IT Hit Ajax File Browser
  2. Sample WebDAV Browser

Note that these clients require your server to support PUT with Range header.

Another solution is to create a HttpListener-based server. HttpListener has much less functionality comparing to IIS but it does not have any upload limitations.



来源:https://stackoverflow.com/questions/16517816/uploading-files-greater-than-2gb-in-asp-net-mvc-3

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!