Handling large file upload

T

Thomas Due

Hi,

I am writing an ASP.NET project where I allow users to upload files to
the server. I have changed to web.config to allow a total file size of
100MB. My problem is that if the total file size exceed this amount the
page simply stops works, and I get a "Server unreachable" error.

Is there any way to handle this, so I am able to present the user with
a nice error message telling him that the maximum file size has been
exceeded.

Furthermore, it is my understanding that the server uploads all files
to memory before I get to handle them with HtmlInputFile. Is there any
way to perform some checking beforehand, by using http header handle or
something?

Examples will be appreciated.


Thank you in advance,
 
V

vrushal

hi

add httpruntime tag in WEB Config .. and add propery
maxrequestlength.
default value for maxrequestlength is around 4 MB u have
to change it..

by setting value for maxrequestlength will do.


vrushal
 
J

Jos Vernon

Thomas
Furthermore, it is my understanding that the server uploads all files
to memory before I get to handle them with HtmlInputFile. Is there any
way to perform some checking beforehand, by using http header handle or
something?

You need to use a third party product to do this type of thing. The fact
that large uploads are cached in memory will likely cause ASP.NET to
recycle/crash.

We do one solution and I believe there is at least one other out there -
though of course not as good as ours ;-).

Best Wishes

Jos
 
T

Thomas Due

John said:
Ty using a signed Java applet to upload your large files. The applet
can be embedded into a web page and upload the selected files via FTP.
This solution will allow your users to send files of any size.

Yes and it will require the users to enable java applets, even though
it would be signed, this will be cut off some users. What I want is a
pure ASP.NET solution, but maybe that is not possible.

Thank you for your reply though.
 
T

Thomas Due

Jos said:
It is possible using a third party product like our ABCUpload .NET -
written in managed code.

Managed code? What does that mean?
It's just not possible using the - straight - .NET Framework.

Ok, thank you for the reply.
 
J

Jos Vernon

Managed code? What does that mean?

It essentially means that the code is written in VB.NET or C# rather than
C++ or VB6.

Best Wishes

Jos
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top