Skip to content

3.2. Instantiate configuration

franciscoserdio edited this page Aug 8, 2016 · 1 revision

Configuration goes in the Web.Config file

Instance inside the <configSections>

This section INSTANTIATE the configuration of the error chain.

Important:

The responsibility chain stops at the 1st element that

  • Specifies breakChain="true"

  • &&

  • Is successfully processed

    <!-- CUSTOM - ERROR HANDLER SECTION DEFINITION -->
    <appErrors>
      <appErrorsSection source="MY APP NAME">
        <errorChainItem type="FW.ErrorHandler.ErrorPageFlower, FW.ErrorHandler" breakChain="false" parameters="ErrorPage=~/Error.aspx"/>
        <errorChainItem type="FW.ErrorHandler.ErrorEmailSender, FW.ErrorHandler" breakChain="false" parameters="SMTPHOST=a_smtp_host; User=a_user; Password=a_password; From=from_email_address; To=to_email_address; Subject=a_subject"/>
        <errorChainItem type="FW.ErrorHandler.ErrorDatabaseWriter, FW.ErrorHandler" breakChain="true"/>
        <errorChainItem type="FW.ErrorHandler.ErrorEventLogWriter, FW.ErrorHandler" breakChain="true"/>
      </appErrorsSection>
    </appErrors>

Clone this wiki locally