Request Timeout Error Question

  • Thread starter Thread starter Steve Taylor
  • Start date Start date
S

Steve Taylor

Here's what happening:

- I have a global error trap set in global.asax defined as:
protected void Application_Error(Object sender, EventArgs e) {
HttpContext.Current.Server.Transfer("/salesnow/errors/SalesNow_Error.aspx"); }

- My users are on occassion are getting the error:
"Server Error in '/Salesnow' Application - Request timed out."

- No aspx page is referenced anywhere in the *ugly* default error page.

- My error trap is designed to e-mail me notices of errors.

- I am seeing about twice as many errors logged in the Win2003 PerfMon window for the web servers (as e-mails).

- Is this happening because my re-directed error page is timing out? What is the best way to trap for this?

TIA,
Steve
 
In your Application_Error, you need to call Server.ClearError() or the error
will still be sitting there and be sent to the default error page.

Server.GetLastError() will also return the exception chain that caused the
error.

HTH,

bill


Here's what happening:

- I have a global error trap set in global.asax defined as:
protected void Application_Error(Object sender, EventArgs e) {

HttpContext.Current.Server.Transfer("/salesnow/errors/SalesNow_Error.aspx");
}

- My users are on occassion are getting the error:
"Server Error in '/Salesnow' Application - Request timed out."

- No aspx page is referenced anywhere in the *ugly* default error page.

- My error trap is designed to e-mail me notices of errors.

- I am seeing about twice as many errors logged in the Win2003 PerfMon
window for the web servers (as e-mails).

- Is this happening because my re-directed error page is timing out? What
is the best way to trap for this?

TIA,
Steve
 
So you're say that I should immediately execute "Server.ClearError()" and
then within my error processing page access the most recent error by by
calling Server.GetLastError()?
 
What I do for my error logging. (psuedo code)

Application_Error
Exception ex = Server.GetLastError();
Server.ClearError();
LogError( ex );
Session["ApplicationError"] = ex; //this will save it in session so I can
pull it from the
Response.Redirect( "ErrorPage.aspx", true ); //I am sure you could use
Server.Transfer, but we don't use Server.Transfer.


--in my ErrorPage

Page_Load
Exception ex = Session["ApplicationError"] as Exception
//display the exception.


This isn't exactly what I do; I switch off the exception type and have
different directions depending on the type of error.

bill
 

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

Back
Top