472,348 Members | 1,212 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,348 software developers and data experts.

Handling large file upload

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,

--
Thomas Due
Software Developer
Scanvaegt Nordic A/S
Nov 17 '05 #1
6 4739

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

-----Original Message-----
Hi,

I am writing an ASP.NET project where I allow users to upload files tothe server. I have changed to web.config to allow a total file size of100MB. My problem is that if the total file size exceed this amount thepage 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 witha nice error message telling him that the maximum file size has beenexceeded.

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

Examples will be appreciated.
Thank you in advance,

--
Thomas Due
Software Developer
Scanvaegt Nordic A/S
.

Nov 17 '05 #2
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

----------------------------------------------------------------------
jos vernon
http://www.websupergoo.com
..NET Image Components & Consultancy
----------------------------------------------------------------------
Nov 17 '05 #3
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.

Take a look at UUpload Pro
http://www.unlimitedftp.ca/uupload/index.jsp

Regards,
John

"heroman" <be***@163.net> wrote in message news:<uD**************@TK2MSFTNGP09.phx.gbl>...
can't use the web to upload file if the file large 2M
if you want upload large file ,you can use ftp,and use SERVU-FTP server,and
the database plugins ,you can use asp or asp.net control it
"Thomas Due" <t.due@scanvaegt_REMOVE.dk> ????
news:OE**************@TK2MSFTNGP12.phx.gbl...
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,

--
Thomas Due
Software Developer
Scanvaegt Nordic A/S

Nov 17 '05 #4
John Tkaczewski wrote:
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.
--
Thomas Due
Software Developer
Scanvaegt Nordic A/S
Nov 17 '05 #5
Jos Vernon wrote:
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.

--
Thomas Due
Software Developer
Scanvaegt Nordic A/S
Nov 17 '05 #6
> 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

----------------------------------------------------------------------
jos vernon
http://www.websupergoo.com
..NET Image Components & Consultancy
----------------------------------------------------------------------
Nov 17 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Tim | last post by:
I meet problem on uploading a file with a large file size. Below is my code, how can I modify in order to be able to upload a large file...
4
by: John Fereira | last post by:
So, one of the limitations of multipart-form handling is that when an <input type="file" ..> tag is used it will bring up a window which allows a...
1
by: Ron Vecchi | last post by:
When posting a file upload I have taken in consideration the maxRequestLength and set it accordingly. In my case where a posibility of a 30 meg...
14
by: Al Smith | last post by:
I need help in implementing proper error handling. I am trying to upload a file based on the sample code below. The code works well except if...
1
by: Nawaz Ijaz | last post by:
Hi All, Just need to know that how can it be possible to upload large file in chunks of bytes. Suppose i have a large file (100 MB) and i want to...
6
by: Paul | last post by:
Hi there, When adding a "File Field" HTML control to an aspx page to facilitate file uploading, the following occurs: 1. You select a file...
16
by: lawrence k | last post by:
I've a file upload script on my site. I just now used it to upload a small text document (10k). Everything worked fine. Then I tried to upload a...
3
by: J055 | last post by:
Hi How do I tell the user he has tried to upload a file which is too big... 1. when the httpRuntime.maxRequestLength has been exceeded and 2....
6
by: howa | last post by:
Suppose the file is stored in "upload_tmp_dir ", so why I need to increase the memory limit? If I want to upload 100 MB, how large should I set?...
0
by: teenabhardwaj | last post by:
How would one discover a valid source for learning news, comfort, and help for engineering designs? Covering through piles of books takes a lot of...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was...
0
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. ...
2
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it...
0
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific...
0
Oralloy
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the...
0
by: Carina712 | last post by:
Setting background colors for Excel documents can help to improve the visual appeal of the document and make it easier to read and understand....

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.