It looks great and is raised by Application_Error.
Have you checked Debugging
your application?
Actually, you are missing Server.ClearError()
, so the exception is thrown by asp.net, but you have to suppress it because you are handling it yourself.
protected void Application_Error(object sender, EventArgs e) {
source share