Exceeding File Upload max size - trapping error

Discussion in 'ASP .Net' started by Brett Robichaud, Apr 7, 2004.

  1. 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-
    Brett Robichaud, Apr 7, 2004
    #1
    1. Advertising

  2. Brett Robichaud

    bruce barker Guest

    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" <> wrote in message
    news:#...
    > 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-
    >
    >
    bruce barker, Apr 7, 2004
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Kevin Goodsell

    Exceeding container::max_size()?

    Kevin Goodsell, Apr 3, 2004, in forum: C++
    Replies:
    1
    Views:
    364
    Victor Bazarov
    Apr 4, 2004
  2. Chris

    Exceeding -Xmx memory size

    Chris, May 24, 2006, in forum: Java
    Replies:
    3
    Views:
    8,234
    Chris Smith
    May 24, 2006
  3. gbattine

    Max size for upload...

    gbattine, Jul 11, 2006, in forum: Java
    Replies:
    5
    Views:
    1,563
    Moiristo
    Jul 12, 2006
  4. Replies:
    8
    Views:
    687
    Gabriel Genellina
    May 14, 2008
  5. Iain King
    Replies:
    6
    Views:
    794
    Iain King
    Jul 3, 2008
Loading...

Share This Page