我正在使用 ELMAH 通过电子邮件发送错误消息。是否有一个优雅的解决方案来查询数据库的 SMTP 设置而不是使用 web.config?我需要在抛出每个错误之前完成它。
这里建议的解决方案对我来说有点 hacky。
我正在使用 ELMAH 通过电子邮件发送错误消息。是否有一个优雅的解决方案来查询数据库的 SMTP 设置而不是使用 web.config?我需要在抛出每个错误之前完成它。
这里建议的解决方案对我来说有点 hacky。
Aside from your hacky method, the only other option that I can think of is to roll your own version of the binary, like SO does. You can find the source here:
http://code.google.com/p/elmah/source/browse/trunk/src/Elmah/