473,795 Members | 2,983 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 4848

hi

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

by setting value for maxrequestlengt h 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.ne t> wrote in message news:<uD******* *******@TK2MSFT NGP09.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@scanvaeg t_REMOVE.dk> ????
news:OE******** ******@TK2MSFTN GP12.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
2455
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 successfully ? Thank for your help. upload.html: <html> <body><br><br><center> <form action="upload.php" method=post enctype="multipart/form-data"> File upload: <input type=file name="userfile"> <input type=submit value="send"><br> </form>
4
2824
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 user to select a file for upload but won't allow the user to select multiple files. As you may know, the tag produces a text input field with an adjacent button for selecting a file from the local file system. As I would like to be able to allow the user to upload an arbitrary number of files...
1
1599
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 file can be uploaded I set it to 30720. Although its hard to test since I'm developing locally I am a little worried about the time it might take to post this 30 mb file if the person is on dialup. (worst case scenario) Is there anything that would timeout on me. I have looked into...
14
3899
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 the file selected is too big. I do know about the maxRequestLength parameter of the <httpRuntime> section and that works as expected. What I want is to enforce a max file size but haven't been able to trap the error thrown when the file is too large and that's where I could use some help.
1
2895
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 upload it in chunks (say 20 KB). How can this be done as "Simple html File Upload Control" upload file in one go. That i not want really, I want to upload it to the server from my aspx page in parts/chunks. regards, Nawaz Ijaz.
6
3619
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 that is larger than the allowed size limit. 2. Once the user selected the too large file, the page is redirected to a "page not found" error page. 3. This is as per the docs, but my question is:
16
4987
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 5.3 meg Quicktime video. Didn't work. I've set the POST limit in php.ini to 8 megs. What reasons, other than the POST limit, would a large upload fail?
3
4934
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. when the uploaded file is under then httpRuntime.maxRequestLength For point 1. it would be good to at least display a nice error page. IE seems to just display a blank page.
6
4868
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? Thanks.
0
9672
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10438
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10214
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10164
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9042
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5437
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5563
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3727
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2920
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.