开发者

2 GB File upload in C#

开发者 https://www.devze.com 2022-12-08 20:27 出处:网络
There is a requirement where the client needs a option to Upload Files that are really large(<=2GB) through browser.开发者_如何学Go

There is a requirement where the client needs a option to Upload Files that are really large (<=2GB) through browser.开发者_如何学Go

And i found that the browser can support only 2GB file upload. Is it so?

If yes, then for at least 1.9999GB is there any solution?

Tried working with the parameters like maxRequestLength, executionTimeout which resulted in nothing.


An alternative to using a client side control using Flash or Silverlight is to use Darren Johnson's ASP.NET upload module. I'd recommend you take a look at this.

It's an IIS HTTP module that will allow files to be uploaded in small chunks, reducing memory usage. There is some client side JavaScript that will show the user the upload progress.

I'm successfully using this with MOSS 2007 and have tested it with files up to 2GB - it works great!


You have to set it in the machine.config see this: http://support.microsoft.com/?scid=kb;en-us;295626&x=12&y=6


If you are uploading large files it is probably better to use a client side control written in either Sliverlight or flash to upload the file. That way the control can split the file into smaller chucks that are uploaded individually.

The problem with a "normal" file upload is that it is a one shot affair and has no retry mechanism. Also web servers and proxies are not optimised for long requests. As the client gets further away from the host web server it tends to get routed through systems (proxies and such like) that are not in you control. In my experience these play havoc with large files.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号