Application recycle on error

  • Thread starter Thread starter Mr 071
  • Start date Start date
M

Mr 071

When an unhandled exception occurrs in my ASP.NET application the app pool
recycles. It seems to me that this just started happening after some patches
have been applied to Windows Server 2003 we are running the app on.

This is how I try to handle this, but the code does not work, i.e. the error
gets logged and the error page displayed but still the app recycles. Any
ideas? Thanks.

// inside Global.asax.cs
protected void Application_Error(Object sender, EventArgs e)

{

Exception _e = Server.GetLastError();

// log the error...

Server.ClearError();

Server.Transfer("/error/applicationError.htm", true);

}
 
Back
Top