Upload File and custom error

  • Thread starter Thread starter Alessandro
  • Start date Start date
A

Alessandro

Hi,
i want to display a custm page if i upload a file with size >
MaxRequestLength. I try httpmodule, etc etc but i'm not able to redirect to
a default page.
 
to enforce the max file size, asp.net kills the connection to stop the upload
(there is no stop command in http). there is no way to send a response back,
because the request was not completed.

with javascript you can start a seperate request in an iframe or ajax call,
that polls to see if the upload was killed, and display a message.

-- bruce (sqlwork.com)
 
With an HTTPmodule i'm able to see if uploading file size is > if
MaxRequestFile size, but if i try to send user to another page, with
server.transfer or response.redirect i'm able to send user to that page
(page load of FileTooLarge.aspx is loaded).. but i still see on the browser
a DNS page error..
 
Back
Top