title: Log 4 net not logging to file
body: <p>Probably a very simple setup, but I've tried to setup Log4Net. In my web.config I have:</p>
  
  <pre><code>&lt;log4net&gt;
      &lt;appender name="File" type="log4net.Appender.RollingFileAppender"&gt;
        &lt;file value="Logs\\Log4Net.log" /&gt;
        &lt;appendToFile value="true" /&gt;
        &lt;rollingStyle value="Date" /&gt;
        &lt;datePattern value="yyyyMMdd-HHmm" /&gt;
        &lt;layout type="log4net.Layout.PatternLayout"&gt;
          &lt;conversionPattern value="%date [%thread] %-5level %logger [%property{NDC}] - %message%newline" /&gt;
        &lt;/layout&gt;
      &lt;/appender&gt;
  
      &lt;logger name="File"&gt;
        &lt;level value="All" /&gt;
        &lt;appender-ref ref="LogFileAppender" /&gt;
      &lt;/logger&gt;
      &lt;root&gt;
        &lt;level value="ALL"/&gt;
        &lt;appender-ref ref="FileAppender"/&gt;
      &lt;/root&gt;
    &lt;/log4net&gt;
  </code></pre>
  
  <p>I have added the following to my configsections:</p>
  
  <pre><code>&lt;configSections&gt;
      &lt;section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net"/&gt;
    &lt;/configSections&gt;
  </code></pre>
  
  <p>The following in global.asax:</p>
  
  <pre><code> log4net.Config.XmlConfigurator.Configure();
  </code></pre>
  
  <p>The following is on my default.aspx:</p>
  
  <pre><code>ILog alog = log4net.LogManager.GetLogger(typeof(_Default));
  log4net.ILog logger = log4net.LogManager.GetLogger("File");
  
  protected void Page_Load(object sender, EventArgs e)
  {
      if (!Page.IsPostBack)
      {
          SetupSeo(); 
      }
      alog.Error("this test");
      logger.Error("Front page loaded for ip " + Request.UserHostAddress);
  }
  </code></pre>
  
  <p>What is wrong?</p>