Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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>
like image 474
FarFigNewton Avatar asked Aug 24 '12 15:08

FarFigNewton


People also ask

How do you check ELMAH errors?

Build the application, run it in the browser, and navigate to http://www.yoursite.com/elmah.axd. You are prompted to log in before you see the content. After a successful authentication, you see a web page to remotely view the entire log of recorded exceptions.

What is ELMAH Axd?

Description. ELMAH (Error Logging Modules and Handlers) is an application-wide error logging facility that is completely pluggable. It can be dynamically added to a running ASP.NET web application, or even all ASP.NET web applications on a machine, without any need for re-compilation or re-deployment.

How do I enable ELMAH?

To turn on ELMAH, navigate to Administration » Settings » Advanced » System » UI Elmah Config. Select the IsElmahLoggingTurnedOn checkbox and click Save changes. Every time you change the selection of this checkbox, you must restart the application.

What is ELMAH logging?

In this article ELMAH is a free, open source error logging library that includes features like error filtering and the ability to view the error log from a web page, as an RSS feed, or to download it as a comma-delimited file.


1 Answers

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" />
like image 135
Jay Douglass Avatar answered Oct 21 '22 19:10

Jay Douglass