Upload File and custom error


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.
 
Ad

Advertisements

B

bruce barker

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)
 
Ad

Advertisements

A

Alessandro

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

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

Top