none
elmah mandar email RRS feed

  • Pergunta

  • ola,

    estou a usar o Elmah para o tratamento de erros, preciso de enviar por email os erros.Mas não estou conseguindo.

    código:

     <system.web>
      
        <httpModules>
          <add name="ErrorLog" type="Elmah.ErrorLogModule, Elmah" />
          <add name="ErrorMail" type="Elmah.ErrorMailModule, Elmah" />
          <add name="ErrorFilter" type="Elmah.ErrorFilterModule, Elmah" />
        </httpModules>
    
     </system.web>
    
    
     <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>
    
    </system.webServer>
    
    
    
    <elmah>
    <errorMail from="support@example.com"
      to="****"
      subject="Error from Elmah"
      async="true"
      smtpServer="smtp.gmail.com"
      useSsl="true"
      useTLS="true"
     />
     </elmah>

    quarta-feira, 13 de novembro de 2013 16:57

Todas as Respostas

  • tem esse trecho no web.config?

    <configSections>
        <sectionGroup name="elmah">
        <section name="security" requirePermission="false" type="Elmah.SecuritySectionHandler, Elmah" />
        <section name="errorLog" requirePermission="false" type="Elmah.ErrorLogSectionHandler, Elmah" />
        <section name="errorMail" requirePermission="false" type="Elmah.ErrorMailSectionHandler, Elmah" />
        <section name="errorFilter" requirePermission="false" type="Elmah.ErrorFilterSectionHandler, Elmah" />
        </sectionGroup>
    </configSections>

    :

    quarta-feira, 13 de novembro de 2013 17:04
  • sim

    quarta-feira, 13 de novembro de 2013 17:25
  • Bom, seguinte, por gentileza, olhe esse link:

    http://www.stormconsultancy.co.uk/blog/development/tools-plugins/setup-email-alerts-from-elmah-when-exceptions-are-raised/

    e  verifica se está tudo ok, o passo a passo.

    quarta-feira, 13 de novembro de 2013 17:37