开发者

How do you configure Elmah to tweet error messages?

开发者 https://www.devze.com 2023-03-08 17:24 出处:网络
I read that Elmah can tweet error messages so I tried to set it up, but could not get it to work.I am able to get it to save the errors into a database and email me the error, but the tweet doesn\'t s

I read that Elmah can tweet error messages so I tried to set it up, but could not get it to work. I am able to get it to save the errors into a database and email me the error, but the tweet doesn't seem to work.

Here is my configuration:

<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,G开发者_如何学CET,HEAD" type="Elmah.ErrorLogPageFactory, Elmah" preCondition="integratedMode" />
    </handlers>
</system.webServer>

No errors occur, the tweet just does not appear even though it's logged in the database and emailed.


See the ErrorHowling wiki on the project's site for some background and information on ErrorTweetModule and its use.

0

精彩评论

暂无评论...
验证码 换一张
取 消