title: Can't get ELMAH to works with ASP.NET MVC2 on IIS7.5
body: <p>I try to use ELMAH on my ASP.NET MVC2 application, it works fine on the test server (Casini x86) while using the x86 version, but when I deploy it on the production server with the x86_64 version, I get a 404 error when I try to access "elmah.axd" and no errors are logged on IIS (but they are logged in Casini)</p>
  
  <p>Here is my Web.config </p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;!--
    For more information on how to configure your ASP.NET application, please visit
    http://go.microsoft.com/fwlink/?LinkId=152368
    --&gt;
  &lt;configuration&gt;
    &lt;configSections&gt;
      &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;/configSections&gt;
    &lt;connectionStrings&gt;
      &lt;add name="ApplicationServices" connectionString="Data Source=.\SQLEXPRESS;Initial Catalog=IronViper;Integrated Security=SSPI" providerName="System.Data.SqlClient" /&gt;
      &lt;add name="IronViperEntities" connectionString="metadata=res://*/Models.IronViper.csdl|res://*/Models.IronViper.ssdl|res://*/Models.IronViper.msl;provider=System.Data.SqlClient;provider connection string=&amp;quot;Data Source=.\SQLEXPRESS;Initial Catalog=IronViper;Integrated Security=True;MultipleActiveResultSets=True&amp;quot;" providerName="System.Data.EntityClient" /&gt;
    &lt;/connectionStrings&gt;
    &lt;elmah&gt;
      &lt;errorLog type="Elmah.XmlFileErrorLog, Elmah" logPath="~/App_Data" /&gt;
    &lt;/elmah&gt;
    &lt;system.web&gt;
      &lt;httpHandlers&gt;
        &lt;add verb="POST,GET,HEAD" path="elmah.axd" type="Elmah.ErrorLogPageFactory, Elmah" /&gt;
      &lt;/httpHandlers&gt;
      &lt;httpModules&gt;
        &lt;add name="ErrorLog" type="Elmah.ErrorLogModule, Elmah" /&gt;
      &lt;/httpModules&gt;
      &lt;trace localOnly="false" pageOutput="true" /&gt;
      &lt;compilation debug="true" targetFramework="4.0"&gt;
        &lt;assemblies&gt;
          &lt;add assembly="System.Web.Abstractions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /&gt;
          &lt;add assembly="System.Web.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /&gt;
          &lt;add assembly="System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /&gt;
          &lt;add assembly="System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /&gt;
        &lt;/assemblies&gt;
      &lt;/compilation&gt;
      &lt;authentication mode="Forms"&gt;
        &lt;forms loginUrl="~/Account/LogOn" timeout="2880" /&gt;
      &lt;/authentication&gt;
      &lt;membership&gt;
        &lt;providers&gt;
          &lt;clear /&gt;
          &lt;add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="ApplicationServices" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" applicationName="/" /&gt;
        &lt;/providers&gt;
      &lt;/membership&gt;
      &lt;profile&gt;
        &lt;providers&gt;
          &lt;clear /&gt;
          &lt;add name="AspNetSqlProfileProvider" type="System.Web.Profile.SqlProfileProvider" connectionStringName="ApplicationServices" applicationName="/" /&gt;
        &lt;/providers&gt;
      &lt;/profile&gt;
      &lt;roleManager enabled="true"&gt;
        &lt;providers&gt;
          &lt;clear /&gt;
          &lt;add connectionStringName="ApplicationServices" applicationName="/" name="AspNetSqlRoleProvider" type="System.Web.Security.SqlRoleProvider" /&gt;
          &lt;add applicationName="/" name="AspNetWindowsTokenRoleProvider" type="System.Web.Security.WindowsTokenRoleProvider" /&gt;
        &lt;/providers&gt;
      &lt;/roleManager&gt;
      &lt;pages&gt;
        &lt;namespaces&gt;
          &lt;add namespace="System.Web.Mvc" /&gt;
          &lt;add namespace="System.Web.Mvc.Ajax" /&gt;
          &lt;add namespace="System.Web.Mvc.Html" /&gt;
          &lt;add namespace="System.Web.Routing" /&gt;
        &lt;/namespaces&gt;
      &lt;/pages&gt;
    &lt;/system.web&gt;
    &lt;system.webServer&gt;
      &lt;validation validateIntegratedModeConfiguration="false" /&gt;
      &lt;modules runAllManagedModulesForAllRequests="true" /&gt;
      &lt;httpWarmup&gt;
        &lt;requests&gt;
          &lt;add requestUrl="/" allowedResponseCodes="200-399" warmupContext="" sendMode="Asynchronous" /&gt;
        &lt;/requests&gt;
      &lt;/httpWarmup&gt;
    &lt;/system.webServer&gt;
    &lt;runtime&gt;
      &lt;assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"&gt;
        &lt;dependentAssembly&gt;
          &lt;assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" /&gt;
          &lt;bindingRedirect oldVersion="1.0.0.0" newVersion="2.0.0.0" /&gt;
        &lt;/dependentAssembly&gt;
      &lt;/assemblyBinding&gt;
    &lt;/runtime&gt;
    &lt;appSettings&gt;
    &lt;/appSettings&gt;
  &lt;/configuration&gt;
  </code></pre>
  
  <p>The URL used on the production server is: <a href="http://xxxx/IronViperWebInterface/elmah.axd" rel="nofollow noreferrer">http://xxxx/IronViperWebInterface/elmah.axd</a></p>
  
  <p>and on Casini : <a href="http://localhost:xxxx/elmah.axd" rel="nofollow noreferrer">http://localhost:xxxx/elmah.axd</a></p>
  
  <p>I tried to change </p>
  
  <pre><code>&lt;add verb="POST,GET,HEAD" path="elmah.axd" type="Elmah.ErrorLogPageFactory, Elmah" /&gt;
  </code></pre>
  
  <p>to</p>
  
  <pre><code>&lt;add verb="POST,GET,HEAD" path="IronViperWebInterface/elmah.axd" type="Elmah.ErrorLogPageFactory, Elmah" /&gt;
  </code></pre>
  
  <p>but that don't change anything.</p>
  
  <p>I can't find the problem..</p>
  
  <p>Any idea please ?</p>
  
  <p>Thank you</p>