How would I go about catching an error within ELMAH when it tries to log an error to a SQL database. Currently, the SQL logging is working as expected, but what if the database is down? How would I be able to log exceptions while the database is down?
ASP.Net 2.0 using C# //yes I am working on defects for a client with a legacy application
I have written an answer to this problem which boils down to this:
However I would like to point out that this is not a recommended way of monitoring your sql server. You don't want to have to wait for an error before realizing that the error cannot be logged / traced. So I would recommend setting up an independent SQL Server monitor that will be your first line of defense against such a problem.