views:

2459

answers:

7

Hi,

I wish to create an ASP.NET web application that allows upload of files up to a size of 4GB. How can I achieve that? I would prefer something like a "Download" manager where I can resume, pause etc...

Is that possible? If so, where should I start? I think asp.net has a limit of 4mb upload or something? I am not too sure..

Please advice.

Cheers

A: 

The file upload limit is usually governed by a server configuration file. I'm sorry, i'm a PHP guy so I'm not certain in asp.net but for our server we have a php.ini file with the upload_max_filesize that sets the total size allowable.

For the upload manager, you'll likely need something built using java net beans, a java-based plugin you can purchase or swfuploader.

We've used swfuploader with much success on many sites.

jerebear
+1  A: 

You can always implement file uploads yourself, it's really not that super difficult if the .NET utility has some limit coded in to it (though it really shouldn't).

As far as some kind of "upload" manager that you can resume, etc, that's simply not possible as it requires cooperation with with the client, and the modern browsers upload functionality simply isn't that "smart".

You might be able to create a small Java Applet that you can embed in your page to handle the client side of the conversation, but you'll need to sign the applet, and you'll also need custom server logic to handle the backend.

Will Hartung
Instead of Java you could of course also use Flash or Silverlight, but essentially you're right: The file has to be managed Client-Side and only slices are to be uploaded.
Michael Stum
+1  A: 

In addition to the server's limits, browsers also limit the size of a file that can be sent in a POST (slightly outdated: http://www.motobit.com/help/scptutl/pa98.htm). This is why many implement a Flash- or Java-based solution that can perform the upload "out-of-band" using a direct pipe to the server, so to speak.

Jarret Hardie
+3  A: 

You'll probably want to use a third-party component to do this.

You're correct in that by default, the standard file upload control won't allow anything beyond 4MB. You can change that value using the maxRequestLength attribute of the httpRuntime configuration section in web.config. You'd also need to change the executionTimeout attribute. See here for more info.

But up to 4GB? I doubt you'll have much success with a standard file upload control. If the connection drops, it's all over and they'll have to start again. You probably want something that can maintain the connection and provide a progress bar and the like.

Have a look at products like FileUp or EasyAlgo. A google search should find you plenty.

Damovisa
A: 

at filemail.com they have used a Flex-client even though the site is based on asp.net. So overall i think "everyone" use a active-x kind of client for this task.

ThorHalvor
+1  A: 

The limit in .NET 2.0 is 2 GB.

If 3.5, then consider this in your web.config, if you have one. it sets the max file size and timeout :

<httpRuntime maxRequestLength="4194304" executionTimeout="2400"/>

Of course, uploading file to a web site can be dangerous if you are not caustious, so like the other posters, consider using an existing tested one, at least to learn all the caveats. Good luck.

Ash Machine
A: 

You can do files up to 4GB with ASP.NET using a third party solution that overrides the built-in request checking. This will work in all versions of IIS except IIS 7 integrated mode, which has a hard 2GB limit.

Most uploaders don't have the capacity for pause/resume, so you may be out of luck there. Google and see what you can find. You'll probably have to go Java or ActiveX to get this functionality.

begin plug

I'm the author of SlickUpload, one of the first ASP.NET uploaders -- it supports uploads up to 4 GB. We don't have Flash, Silverlight, or Java support, but currently do have the best AJAX only experience, and the rich applet interfaces are coming in future versions.

Chris Hynes
Can I upload multiple files with SlickUpload?
Imageree