oscilatingcretin oscilatingcretin - 2 months ago 42
ASP.NET (C#) Question

ELMAH: Can you set it up to email errors only remotely?

While debugging my solution locally, I would like to not receive ELMAH error emails. I'd only like to receive them when the application is hosted on a remote machine. Is this possible?

Answer Source

I found a solution which is to use config transforms with VS 2010. I removed the <errorMail /> tag from my base web.config then added it to my Web.Qa.Config and Web.Release.Config with transform tags. When I publish, it allows the remote machines to send out the emails while they are suppressed locally.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download