ELMAH Configuration Validator

Disclamer: Configuring ELMAH (as well as elmah.io) happens through your application configuration file (like web.config). In the next version of ASP.NET, web.config files are removed, but web.config files will probably continue to exist for years to come.

Let's face it, configuring ASP.NET applications in XML is sort of pain in the a... There's a trend towards fluent configuration in C# code, which is way easier to write and understand. But for now, ELMAH (as well as elmah.io) is configured in your web/app.config.

To ease writing ELMAH configuration, we created a GitHub repository a couple of days ago, with a XML schema for writing ELMAH config, originally created by Jeff Lingis. Today we take another step towards writing pain-free ELMAH config. Please welcome the ELMAH Configuration Validator.

The ELMAH Configuration Validator lets you validate your web.config file for errors in your ELMAH config. The validator both validates the web.config file itself as well as look for <elmah> elements and validating them against the ELMAH Schema.

ELMAH Configuration Validator

In the example above, I have a typo in the <errorLog> element, which the validator points out.

Like the ELMAH Security Validator (now discontinued), this new validator is free for anyone to use. Also make sure to check out the ELMAH XML Schema to add IntelliSense to your ELMAH configuration.

elmah.io: Error logging and Uptime Monitoring for your web apps

This blog post is brought to you by elmah.io. elmah.io is error logging, uptime monitoring, deployment tracking, and service heartbeats for your .NET and JavaScript applications. Stop relying on your users to notify you when something is wrong or dig through hundreds of megabytes of log files spread across servers. With elmah.io, we store all of your log messages, notify you through popular channels like email, Slack, and Microsoft Teams, and help you fix errors fast.

See how we can help you monitor your website for crashes Monitor your website