Limiting the Number of Emails Sent By Elmah

后端 未结 4 1543
有刺的猬
有刺的猬 2021-02-04 11:29

Does anyone know of a good way to limit the number of emails sent by Elmah during a time period like you can with Health Monitoring?

I want to be able to limit the email

4条回答
  •  爱一瞬间的悲伤
    2021-02-04 11:42

    I had a similar problem and opted to use the log-to-SQL method for ELMAH. I used SQLExpress 2008 (free-version) on my Web server and then setup SQL Reporting to send digest emails every morning.

    This method required no coding, just setup of the SQL server and reporting services. It has the benefit of letting you run reports on months of error logs rather than just seeing them daily. In addition, though, you can schedule reports as frequently as you like.

    The ELMAH wiki page has information on how to setup the web.config to point to a SQL server. There are many options for getting the data out, once the data is in SQL but I find the SQL Express reporting services were perfect for my needs.

提交回复
热议问题