Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8854019
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T13:47:14+00:00 2026-06-14T13:47:14+00:00

In my installer, I have public void Install(IWindsorContainer container, IConfigurationStore store) { container.AddFacility<LoggingFacility>(f =>

  • 0

In my installer, I have

public void Install(IWindsorContainer container, IConfigurationStore store)
{
    container.AddFacility<LoggingFacility>(f => f.UseLog4Net("log4net.config"));
}

My log4net config file (which gets deployed to the bin directory of my ASP.NET MVC app) is:

<log4net>
<appender name="AdoNetAppender" type="log4net.Appender.AdoNetAppender">
  <bufferSize value="100" />
  <connectionType value="System.Data.SqlClient.SqlConnection, System.Data, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
  <connectionString value="data source=GCO06773\SQLEXPRESS;initial catalog=GEMS;integrated security=false;persist security info=True;User ID=<<userid removed>>;Password=<<password removed>>#" />
  <commandText value="INSERT INTO Log ([Date],[Thread],[Level],[Logger],[Message],[Exception]) VALUES (@log_date, @thread, @log_level, @logger, @message, @exception)" />
  <parameter>
    <parameterName value="@log_date" />
    <dbType value="DateTime" />
    <layout type="log4net.Layout.RawTimeStampLayout" />
  </parameter>
  <parameter>
    <parameterName value="@thread" />
    <dbType value="String" />
    <size value="255" />
    <layout type="log4net.Layout.PatternLayout">
      <conversionPattern value="%thread" />
    </layout>
  </parameter>
  <parameter>
    <parameterName value="@log_level" />
    <dbType value="String" />
    <size value="50" />
    <layout type="log4net.Layout.PatternLayout">
      <conversionPattern value="%level" />
    </layout>
  </parameter>
  <parameter>
    <parameterName value="@logger" />
    <dbType value="String" />
    <size value="255" />
    <layout type="log4net.Layout.PatternLayout">
      <conversionPattern value="%logger" />
    </layout>
  </parameter>
  <parameter>
    <parameterName value="@message" />
    <dbType value="String" />
    <size value="4000" />
    <layout type="log4net.Layout.PatternLayout">
      <conversionPattern value="%message" />
    </layout>
  </parameter>
  <parameter>
    <parameterName value="@exception" />
    <dbType value="String" />
    <size value="2000" />
    <layout type="log4net.Layout.ExceptionLayout" />
  </parameter>
</appender>
<root>
  <level value="INFO" />
  <appender-ref ref="AdoNetAppender" />
 </root>
</log4net>

I have a controller that’s instantiated via Castle.Windsor The relevant code is:

public ILogger Logger { get; set; }
public ActionResult Index()
{
    Logger.Info("Info");
    Logger.Debug("Debug");
    Logger.Error("Error");
    Logger.Fatal("Fatal");
    Logger.Warn("Warn");
    return View();
}

The Logger is a valid castle logger and when I delve into it in the watch window, it appears that there are no appenders associated with the underlying log4net logger, except for the root appender.

According to procmon, the log4net.config file is actually being accessed at some point, so I’m assuming it’s being read. I get no errors in the IIS log, no errors in the event log and no exceptions or errors that I can detect. I’m stumped.

UPDATE 1:
Forgot to mention, I added this:

<add key="log4net.Config" value="log4net.config"/>

to the web.config, but it didn’t seem to change anything.

UPDATE 2:

I’m using Log4Net 1.2.10.0 with public key token: 1b44e1d426115821 (this matters with Castle Logging which is why I mention it).

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T13:47:16+00:00Added an answer on June 14, 2026 at 1:47 pm

    The log4net.config file should be in root of your web, not in bin directory.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I currently have this installer: class DemiInstaller : IWindsorInstaller { public void Install(IWindsorContainer container,
I have an installer that prompts users to restart their computer after an install.
I have created a Installhelper.cs which is inhered from the Installer. Override the Install()
I have the following unit test in my application: [TestMethod] public void Windsor_Can_Resolve_HomeController_Dependencies() {
In my installer I have set WixUIBannerBmp to point to my own custom dialog-banner.bmp
I have an installer and i want to add Sap Crystal Report to this
We have an installer application. In that we have one dll related to our
I have an installer for which I don't have any source code. I need
I have an installer that needs to a person to be an admin (
I have an installer which installs services and then starts them. On some machines

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.