Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>This is the entire configuration for the sample given here <a href="http://www.castleproject.org/container/gettingstarted/part1/index.html" rel="nofollow noreferrer">Home » MicroKernel/Windsor » Getting Started » Part 1 - The basics</a></p> <pre class="lang-xml prettyprint-override"><code>&lt;configuration&gt; &lt;configSections&gt; &lt;section name="castle" type="Castle.Windsor.Configuration.AppDomain.CastleSectionHandler, Castle.Windsor" /&gt; &lt;/configSections&gt; &lt;castle&gt; &lt;facilities&gt; &lt;facility id="logging" type="Castle.Facilities.Logging.LoggingFacility, Castle.Facilities.Logging" loggingApi="log4net" configFile="D:\\Backup-E\\My Work\\.NET\\CastleWindsorPOC\\CastleWindosorApp\\CastleWindosorApp\\Log4Net.xml" /&gt; &lt;/facilities&gt; &lt;components&gt; &lt;component id="httpservicewatcher" type="CastleWindosorApp.HttpServiceWatcher, CastleWindosorApp" &gt; &lt;parameters&gt; &lt;notifiers&gt; &lt;array&gt; &lt;item&gt;${email.notifier}&lt;/item&gt; &lt;item&gt;${alarm.notifier}&lt;/item&gt; &lt;/array&gt; &lt;/notifiers&gt; &lt;Url&gt;test url&lt;/Url&gt; &lt;!--&lt;Logger&gt;${logger.component}&lt;/Logger&gt;--&gt; &lt;/parameters&gt; &lt;/component&gt; &lt;component id="email.notifier" service="CastleWindosorApp.IFailureNotifier, CastleWindosorApp" type="CastleWindosorApp.EmailFailureNotifier, CastleWindosorApp" /&gt; &lt;component id="alarm.notifier" service="CastleWindosorApp.IFailureNotifier, CastleWindosorApp" type="CastleWindosorApp.AlarmFailureNotifier, CastleWindosorApp" /&gt; &lt;!--&lt;component id="logger.component" service="Castle.Core.Logging.ILogger, Castle.Core" type="Castle.Services.Logging.Log4netIntegration.Log4netLogger, Castle.Services.Logging.Log4netIntegration" /&gt;--&gt; &lt;component id="form.component" type="CastleWindosorApp.Form1, CastleWindosorApp" /&gt; &lt;/components&gt; &lt;/castle&gt; </code></pre> <p>The mistake I did was (as you can see the sections commented in the config file), tried to assign the Logger property once again in my class by registering the component in castle. this is not required as Castle does this automatically for you.</p> <p>Cheers Badal</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload