determine app debug mode??

A

Arthur Dent

Hi. I have some code which traps application errors in my webapp, and emails
them to our development team.

I would like to do this though only when debug=false in the web.config.
In theory, if its in debug mode, we are working on it directly, and will see
the errors. When its not, its essentially in production mode, and errors
should be emailed to us.

How can i get out this setting?
Thanks in advance,
- Arthur.
 
A

Arthur Dent

Thanks, but i dont think this will work for me. The code i want to be
conditional is in the global.asax.vb file. This will be always compiled
ahead, like an aspx.vb file. It is not dynamically compiled like an .aspx
file. Therefore this code would be skipped, and not in the binary. So even
if the debug setting in web.config is set to true, this code will not be
there to handle it, because it was never compiled in in the first place.

Any other suggestions?
Thanks in advance.
 

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

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top