Hello,
I am using ELMAH for error reporting in my asp.net projects. everything is working great. Except when i debug a project i don't want to send email report to the allowed users. How can i accomplish this feat?
Thank you,
Sean
Hello,
I am using ELMAH for error reporting in my asp.net projects. everything is working great. Except when i debug a project i don't want to send email report to the allowed users. How can i accomplish this feat?
Thank you,
Sean
Assuming you have different web.config files for your development and production environments, just disable Elmah in your development web.config. You'll want to comment out (or remove) the Elmah.ErrorLogModule element in the httpModules section.
Thanks Jim. can i do it with code behind? like:
// disable elmah
// enable elmah
Maybe you can use ErrorFiltering to turn off the email logging in the Global.asax. Something like:
void ErrorMail_Filtering(object sender, ExceptionFilterEventArgs e)
{
#if DEBUG
e.Dismiss();
#endif
}