2011-05-26 62 views
0

我看到Elmah可以發佈錯誤消息,所以我試圖設置它,但無法使其正常工作。我能夠得到它將錯誤保存到數據庫中,並給我發送錯誤信息,但推文似乎不起作用。如何配置Elmah以發送推文錯誤消息?

這裏是我的配置:

<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"/> 
     <section name="errorTweet" requirePermission="false" type="Elmah.ErrorTweetSectionHandler, Elmah"/> 
    </sectionGroup> 
</configSections> 

<elmah> 
    <security allowRemoteAccess="1" /> 
    <errorLog type="Elmah.SqlServerCompactErrorLog, Elmah" connectionStringName="LoggingDB" /> 
    <errorTweet 
     userName="twitter_username" 
     password="twitter_password" statusFormat="{Message}" /> 
</elmah> 

<system.webServer> 
    <modules> 
     <add name="ErrorLog" type="Elmah.ErrorLogModule, Elmah" preCondition="managedHandler" /> 
     <add name="ErrorFilter" type="Elmah.ErrorFilterModule, Elmah" preCondition="managedHandler" /> 
     <add name="ErrorMail" type="Elmah.ErrorMailModule, Elmah" preCondition="managedHandler" /> 
     <add name="ErrorTweet" type="Elmah.ErrorTweetModule, Elmah" preCondition="managedHandler" /> 
    </modules> 
    <handlers> 
     <add name="Elmah" path="elmah.axd" verb="POST,GET,HEAD" type="Elmah.ErrorLogPageFactory, Elmah" preCondition="integratedMode" /> 
    </handlers> 
</system.webServer> 

沒有出現錯誤,鳴叫只是不即使它記錄在數據庫中,通過電子郵件發送出現。

回答

0

參見ErrorTweetModule及其使用的project's site的一些背景和信息​​維基。