473,320 Members | 1,600 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Exceeding File Upload max size - trapping error

I am fully aware of the size limitations of the file upload control in
asp.net and how to change it.

But has anyone figured out how to gracefully handle the situation where an
upload atempt exceeds the maximum? By default asp.net throws up a dns error
page, this just doesn't cut it. How can I trap the error so I can inform
the user of the problem?

-Brett-
Nov 18 '05 #1
2 5415
there is no graceful way. the browser is busy uploading the file, and there
is no stop command in the http protocol, so asp.net closes the tcp/ip
socket, so there is no response (the request never finished). the browser
then picks the error message of its choice.

the only alternative is to accept the upload, throw it away then repond with
an "over limit" message. this is probably worse, because the user has to
wait for the complete upload, then be told it was useless.

-- bruce (sqlwork.com)
"Brett Robichaud" <br************@nospam.yahoo.com> wrote in message
news:#P**************@TK2MSFTNGP11.phx.gbl...
I am fully aware of the size limitations of the file upload control in
asp.net and how to change it.

But has anyone figured out how to gracefully handle the situation where an
upload atempt exceeds the maximum? By default asp.net throws up a dns error page, this just doesn't cut it. How can I trap the error so I can inform
the user of the problem?

-Brett-

Nov 18 '05 #2
there is no graceful way. the browser is busy uploading the file, and there
is no stop command in the http protocol, so asp.net closes the tcp/ip
socket, so there is no response (the request never finished). the browser
then picks the error message of its choice.

the only alternative is to accept the upload, throw it away then repond with
an "over limit" message. this is probably worse, because the user has to
wait for the complete upload, then be told it was useless.

-- bruce (sqlwork.com)
"Brett Robichaud" <br************@nospam.yahoo.com> wrote in message
news:#P**************@TK2MSFTNGP11.phx.gbl...
I am fully aware of the size limitations of the file upload control in
asp.net and how to change it.

But has anyone figured out how to gracefully handle the situation where an
upload atempt exceeds the maximum? By default asp.net throws up a dns error page, this just doesn't cut it. How can I trap the error so I can inform
the user of the problem?

-Brett-

Nov 18 '05 #3

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

Similar topics

2
by: matt | last post by:
I have compiled some code, some written by me, some compiled from various sources online, and basically i've got a very simple flat file photo gallery. An upload form, to upload the photos and give...
1
by: Brett Robichaud | last post by:
I am fully aware of the size limitations of the file upload control in asp.net and how to change it. But has anyone figured out how to gracefully handle the situation where an upload atempt...
1
by: BW | last post by:
I am creating an upload/download function for an extranet site. Files will be uploaded to directory based upon the users login and associated project. The function works as long as I use "c:\Temp"...
6
by: tshad | last post by:
I have an upload file input as: <input id="MyFile" style="width:300px" type="File" runat="Server"> This works fine, but I find that if my page doesn't pass validation during postback, the page...
18
by: Jen | last post by:
I'm using Microsoft's own VB.NET FTP Example: http://support.microsoft.com/default.aspx?scid=kb;en-us;832679 I can get the program to create directories, change directories, etc., but I can't...
2
by: hotflash | last post by:
Hi All, I found the best pure ASP code to upload a file to either server and/or MS Access Database. It works fine for me however, there is one thing that I don't like and have tried to fix but...
1
by: chrisj | last post by:
I'm using freeASPupload and got some assistance integrating to a Member script. It works successfully. In this modified version there are two groups that use this upload script. Members of one...
4
cassbiz
by: cassbiz | last post by:
Could use some help here. This script is carrying over an image just fine but the text isn't coming over. can you see why it is not working???? from the form I want to carry over two lines of...
6
Jacotheron
by: Jacotheron | last post by:
I need a PHP script that can upload music files (mp3). The script is for a home project I have started a while ago. I have a MySQL database of all the music that I have. Other computers on the...
5
by: kailashchandra | last post by:
I am trying to upload a file in php,but it gives me error msg please Help me? My Code is like below:- i have one php file named upload.php and i have another html file named upload.html and...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.