Exceeding File Upload max size - trapping error

  • Thread starter Brett Robichaud
  • Start date
B

Brett Robichaud

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-
 
B

bruce barker

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)
 

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

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top