title: ELMAH not logging errors except for 404's
body: <p>I can't get ELMAH to log errors to my <code>AppData</code> folder for any exceptions except for <code>404</code> errors.  I'm not sure what the problem could be.  I'm guessing it's because I have <code>&lt;customErrors mode="RemoteOnly" defaultRedirect="~/Views/Shared/Error.cshtml"&gt;</code>, but I've tried doing what's recorded <a href="https://stackoverflow.com/questions/766610/how-to-get-elmah-to-work-with-asp-net-mvc-handleerror-attribute/5936867#5936867">HERE</a> and haven't had any luck.  Here's my web.config (at least anything critical to using ELMAH):</p>
  
  <pre><code>&lt;sectionGroup name="elmah"&gt;
    &lt;section name="security" requirePermission="false" type="Elmah.SecuritySectionHandler, Elmah" /&gt;
    &lt;section name="errorLog" requirePermission="false" type="Elmah.ErrorLogSectionHandler, Elmah" /&gt;
    &lt;section name="errorMail" requirePermission="false" type="Elmah.ErrorMailSectionHandler, Elmah" /&gt;
    &lt;section name="errorFilter" requirePermission="false" type="Elmah.ErrorFilterSectionHandler, Elmah" /&gt;
  &lt;/sectionGroup&gt;
  
  &lt;appSettings&gt;
    &lt;add key="elmah.mvc.disableHandler" value="false" /&gt;
    &lt;add key="elmah.mvc.disableHandleErrorFilter" value="false" /&gt;
    &lt;add key="elmah.mvc.requiresAuthentication" value="true" /&gt;
    &lt;add key="elmah.mvc.IgnoreDefaultRoute" value="false" /&gt;
    &lt;add key="elmah.mvc.allowedRoles" value="Programmers" /&gt;
    &lt;add key="elmah.mvc.allowedUsers" value="*" /&gt;
    &lt;add key="elmah.mvc.route" value="elmah" /&gt;
  &lt;/appSettings&gt;
  
  &lt;httpModules&gt;
    &lt;add name="ErrorLog" type="Elmah.ErrorLogModule, Elmah" /&gt;
    &lt;add name="ErrorMail" type="Elmah.ErrorMailModule, Elmah" /&gt;
    &lt;add name="ErrorFilter" type="Elmah.ErrorFilterModule, Elmah" /&gt;
  &lt;/httpModules&gt;
  
  &lt;modules&gt;
    &lt;add name="ErrorLog" type="Elmah.ErrorLogModule, Elmah" preCondition="managedHandler" /&gt;
    &lt;add name="ErrorMail" type="Elmah.ErrorMailModule, Elmah" preCondition="managedHandler" /&gt;
    &lt;add name="ErrorFilter" type="Elmah.ErrorFilterModule, Elmah" preCondition="managedHandler" /&gt;
  &lt;/modules&gt;
  
  &lt;elmah&gt;
      &lt;errorLog type="Elmah.XmlFileErrorLog, Elmah" logPath="~/App_Data"/&gt;
  &lt;/elmah&gt;
  </code></pre>
  
  <p>Here's my <code>FilterConfig.cs</code>:</p>
  
  <pre><code>public class FilterConfig
  {
      public static void RegisterGlobalFilters(GlobalFilterCollection filters)
      {
          filters.Add(new ElmahHandleErrorLoggerFilter());
          filters.Add(new HandleErrorAttribute());
      }
  }
  </code></pre>
  
  <p>And my Custom Elmah Handler:</p>
  
  <pre><code>public class ElmahHandleErrorLoggerFilter : System.Web.Mvc.IExceptionFilter
  {
  
      public void OnException(ExceptionContext context)
      {
          //Log only handled exceptions, because all others will be caught by ELMAH
          if (context.ExceptionHandled)
          {
              ErrorSignal.FromCurrentContext().Raise(context.Exception);
          }
      }
  }
  </code></pre>
  
  <p>Any thoughts on what I could be doing wrong or what I'm missing?</p>