Elmah logging errors in SQL server but not showing up on Elmah.axd

elmah, error-handling, error-logging

Solution

Elmah records an application name for each log entry in the Elmar_error table. When you browse Elmah.axd it uses a default application name to filter the log entries.

You can set the applicationName attribute on the errorLog tag in the elmah Web.config section to view the entries.

<errorLog type="Elmah.SqlErrorLog" applicationName="AppName" />

Problem

I have Elmah set up on a WCF application and it is logging to SQL server. Everything seems to be working as far as inserting the data into the `Elmah_error` table. But there are 5 errors in the table and only 2 displayed on `Elmah.axd`. How can I set Elmah to show all errors that are in the table? Extra info Errors in database - System.Web.HttpRequestValidationException - System.Exception - System.Exception - System.ArgumentException Errors displayed on Elmah.axd - System.Web.HttpRequestValidationException - System.Web.HttpException Web.config settings ``` <httpModules> <add name="ErrorLog" type="Elmah.ErrorLogModule, Elmah" /> <add name="ErrorMail" type="Elmah.ErrorMailModule, Elmah" /> <add name="ErrorFilter" type="Elmah.ErrorFilterModule, Elmah" /> </httpModules> ``` ``` <system.webServer> <modules runAllManagedModulesForAllRequests="true"> <add name="ErrorLog" type="Elmah.ErrorLogModule, Elmah" preCondition="managedHandler" /> <add name="ErrorMail" type="Elmah.ErrorMailModule, Elmah" preCondition="managedHandler" /> <add name="ErrorFilter" type="Elmah.ErrorFilterModule, Elmah" preCondition="managedHandler" /> </modules> <validation validateIntegratedModeConfiguration="false" /> </system.webServer> ``` ``` <system.webServer> <handlers> <add name="ELMAH" verb="POST,GET,HEAD" path="elmah.axd" type="Elmah.ErrorLogPageFactory, Elmah" preCondition="integratedMode" /> </handlers> </system.webServer> ```

Original source