title: ElmahR configuration with asp.net MVC
body: <p>I get Elmah to work correctly with MVC 3 and got down to setting up ElmahR for the same project. The configuration specified did not work for me. My configuration is below.</p>
  
  <p>I haven't changed the defaults much except adding the target Url and source Url. So not sure how to fix this. the wiki (<a href="https://bitbucket.org/wasp/elmahr/wiki/Elmahr.config" rel="nofollow">https://bitbucket.org/wasp/elmahr/wiki/Elmahr.config)</a> for the project says that the dashboard should be a separate app, that did not work for me either. I gues I am missing something substantial since navigating to posterrors.ashx does not seem to be the right thing to do in mvc.</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&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;section name="errorPost" requirePermission="false" type="Elmah.ErrorLogSectionHandler, Elmah" /&gt;
      &lt;/sectionGroup&gt;
      &lt;section name="elmahr" type="ElmahR.Core.Config.SectionHandler, ElmahR" /&gt;
    &lt;/configSections&gt;
    &lt;elmahr&gt;
      &lt;!-- Monitored applications list --&gt;
      &lt;application name="Source Application" sourceId="http://localhost:3154/elmah"/&gt;
    &lt;/elmahr&gt;
    &lt;connectionStrings&gt;
      &lt;add name="ApplicationServices" connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true" providerName="System.Data.SqlClient" /&gt;
    &lt;/connectionStrings&gt;
    &lt;appSettings&gt;
      &lt;add key="webpages:Version" value="1.0.0.0" /&gt;
      &lt;add key="ClientValidationEnabled" value="true" /&gt;
      &lt;add key="UnobtrusiveJavaScriptEnabled" value="true" /&gt;
      &lt;add key="elmah.mvc.disableHandler" value="false" /&gt;
      &lt;add key="elmah.mvc.requiresAuthentication" value="false" /&gt;
      &lt;add key="elmah.mvc.allowedRoles" value="*" /&gt;
      &lt;add key="elmah.mvc.route" value="elmah" /&gt;
    &lt;/appSettings&gt;
    &lt;system.web&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.Helpers, Version=1.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=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /&gt;
          &lt;add assembly="System.Web.WebPages, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /&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="false"&gt;
        &lt;providers&gt;
          &lt;clear /&gt;
          &lt;add name="AspNetSqlRoleProvider" type="System.Web.Security.SqlRoleProvider" connectionStringName="ApplicationServices" applicationName="/" /&gt;
          &lt;add name="AspNetWindowsTokenRoleProvider" type="System.Web.Security.WindowsTokenRoleProvider" applicationName="/" /&gt;
        &lt;/providers&gt;
      &lt;/roleManager&gt;
      &lt;pages&gt;
        &lt;namespaces&gt;
          &lt;add namespace="System.Web.Helpers" /&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;add namespace="System.Web.WebPages" /&gt;
        &lt;/namespaces&gt;
      &lt;/pages&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;add name="ErrorPost" type="ElmahR.Elmah.ErrorPostModule, ElmahR.Elmah" /&gt;
      &lt;/httpModules&gt;
    &lt;/system.web&gt;
    &lt;system.webServer&gt;
      &lt;modules runAllManagedModulesForAllRequests="true"&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;add name="ErrorPost" type="ElmahR.Elmah.ErrorPostModule, ElmahR.Elmah" /&gt;
      &lt;/modules&gt;
      &lt;validation validateIntegratedModeConfiguration="false" /&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-2.0.0.0" newVersion="3.0.0.0" /&gt;
        &lt;/dependentAssembly&gt;
      &lt;/assemblyBinding&gt;
    &lt;/runtime&gt;
    &lt;elmah&gt;
      &lt;errorLog type="Elmah.MemoryErrorLog, Elmah" /&gt;
      &lt;errorPost targetUrl="http://localhost:3154/posterror" sourceId="http://localhost:3154/elmah" /&gt;
    &lt;/elmah&gt;
  &lt;/configuration&gt;
  </code></pre>