Page_Error

A

APA

I have the following error handler on my page:

public void Page_Error(object sender,EventArgs e)
{
System.Exception appException = Server.GetLastError();
HttpException checkException = (HttpException)appException;
if ((checkException.ErrorCode == -2147467259))
{
HttpContext.Current.Server.ClearError();
FileSizeUploadError = true; //class level private variable
}

}


It's used to detect uploaded file size errors. It traps the error fine but
once the event handler completes nothing else on the page is processed and I
receive a "The page cannot be displayed" message in my browser. Why is it
not completing my page?
 
B

bruce barker \(sqlwork.com\)

if the browser uploads a file over the limit, the only why to tell the
browser is for the server to close the connection. The browser then reports
an error (of its choice). There is no response, and the request never
completed (from the browsers point of view). becuase the connection is
killed, so is the processing request as it can not write any data back to
the browser.


-- 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,773
Messages
2,569,594
Members
45,118
Latest member
LatishaWhy
Top