G
Guest
I use an HttpModule that handles unhandled exceptions from an .aspx.cs page
by logging to a text file, logging to the event viewer's app log, and sending
out an email to the website developer and any interested parties. Finally, a
user friendly page (GenericError.aspx) is Redirected To.
My Page_Load event has no code, so when the page is unavailable, (for
instance, the website is down), an unhandled event is generated and my
HttpModule is called. Everything is executed as listed above, but the
redirection to GenericError.aspx generates another unhandled exception
(because the website is down), and thus we enter into a loop.
I end up with 14000+ email messages, and so does everyone specified in a
web.config list.
The only fix I can see is to put a try/catch block in every Page's Page_Load
event.
Is there some smarter way to handle this?
by logging to a text file, logging to the event viewer's app log, and sending
out an email to the website developer and any interested parties. Finally, a
user friendly page (GenericError.aspx) is Redirected To.
My Page_Load event has no code, so when the page is unavailable, (for
instance, the website is down), an unhandled event is generated and my
HttpModule is called. Everything is executed as listed above, but the
redirection to GenericError.aspx generates another unhandled exception
(because the website is down), and thus we enter into a loop.
I end up with 14000+ email messages, and so does everyone specified in a
web.config list.
The only fix I can see is to put a try/catch block in every Page's Page_Load
event.
Is there some smarter way to handle this?