Sunday, November 23, 2008
 
The best way to analyze your logs! Minimize
 Log4Net Mail archive   

The Log4Net mailing list is a great source of information about using log4Net, in this forum we collect all the messages in the log4net user list and some selected threads from the developer list.

Subject: NUnit + Log4Net Config Error
Prev Next
You are not authorized to post a reply.

Author Messages
smdenis

07/30/2008 5:37 AM  

When I compile my website using Visual Web Developer, it builds with no
problems. I created the DLL using the aspnet_compiler on the command line
and send that to NUnit. When I try to run my unit tests, I keep getting this
error:

log4net:ERROR XmlConfigurator: Failed to find configuration section
'log4net' in the application's .config file. Check your .config file for the
<log4net> and <configSections> elements. The configuration section should
look like: <section name="log4net"
type="log4net.Config.Log4NetConfigurationSectionHandler,log4net" />

Here's snippet from my web.config file:

<configSections>
    <!-- Configure Log4Net-->
    <section name="log4net"
type="log4net.Config.Log4NetConfigurationSectionHandler,log4net" />
                <!-- Configure NHibernate -->
                <section name="nhibernate"
type="System.Configuration.NameValueSectionHandler, System,
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>

                <!-- Configure UrlRewriter -->
                <section name="rewriter" requirePermission="false"
type="Intelligencia.UrlRewriter.Configuration.RewriterConfigurationSectionHandler,
Intelligencia.UrlRewriter"/>
        </configSections>
        <!-- NHibernate settings-->
        <nhibernate configSource="config\nhibernate.xml"/>
        <!-- Log4Net Settings -->
  <log4net configSource="config\log4net.xml">
  </log4net>

Every solution I've seen on other forums says to add something to the
AssemblyInfo.cs, but since my project is a website, I don't have it.

I've tried everything, but I can't seem the figure out what the cause of
this error is. Please help.

--
View this message in context: http://www.nabble.com/NUnit-%2B-Log4Net-Config-Error-tp18725592p18725592.html
Sent from the Log4net - Users mailing list archive at Nabble.com.

You are not authorized to post a reply.
Forums > Log4Net > Log4Net Mail archive > NUnit + Log4Net Config Error



ActiveForums 3.7

 

 

 

 

 

 

 

 

Log4Net Dashboard

Log analysis and monitoring made easy!

Log4Net Dashboard is a log viewer that can read log statements from a variety of logging output targets.

You can download a free developer version.

  

Check it out!

On the demonstration site you can try it  with live data.demo.l4ndash.com - Try Log4Net Dashboard with live data

The mail archive is a copy of all the mail sent to the mail address: log4net-user@logging.apache.org, organized as a forum.

If you would like to participate in the mail list, send a mail to log4net-user-subscribe@logging.apache.org.

More information about the mailing list is available on: http://logging.apache.org/log4net/support.html

 

A complete topic list is available and can be viewed here (warning, it takes some time to load)

 

Copyright 2005-2008 by FaktNet AS Terms Of Use Privacy Statement