Handle Exception Only in Release Mode?

A

Al Cohen

When I'm running in Debug mode, I like the pages that ASP.NET displays
when I hit an unhandled exception. However, for Release mode, I'd like
to handle the exception with a nice page that apologizes to the user and
doesn't display the stack trace, by putting something in global.asax's
Application_Error.

Is there any way to have this functionality be different in Debug vs.
Release mode? One thing that comes to mind is to test for debug mode in
Application_Error, but I can't figure out how to do this.

Thanks,

Al Cohen
 

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

Top