0

My webconfig has something like this... and I wanted to filter so I only capture 404 errors to my email .. I am using MVC so what is the best way to do that..?

thanks

First time using Elmah

   <configuration>
   ...

   <system.web>
   ...

   <httpModules>
   ...

   <add name="ErrorLog" type="Elmah.ErrorLogModule, Elmah"/>
   <add name="ErrorMail" type="Elmah.ErrorMailModule, Elmah"/>
   </httpModules>
   </system.web>

  <system.webServer>
  <validation validateIntegratedModeConfiguration="false"/>
  <modules>
  ...

 <add name="Elmah.ErrorLog" type="Elmah.ErrorLogModule, Elmah" preCondition="managedHandler" />
 <add name="Elmah.ErrorMail" type="Elmah.ErrorMailModule" preCondition="managedHandler" />
 </modules>

   ...
   </system.webServer>
   </configuration>

and then

  <elmah>
   <errorMail
        from="me@me.com"
        to="me@me.com"
        subject="my app Error" />
4

1 回答 1