You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4net-user@logging.apache.org by Yoav Atzmony <yo...@hotmail.com> on 2007/01/11 21:31:57 UTC
Could not find schema information for the element 'log4net'
Hi,
I am getting the following error upon compile of .Net 2 , Web App in C#:
Could not find schema information for the element 'log4net'
Every element in the <log4net> web.config file is also returning the same
above message. I am using log4net 1.2.10 (using the release dll from the 2.0
folder, but this was also happening with an older DLL which a colleague had
given to me as well)
I believe there is something wrong in my web.config and that this is a
trivial mistake on my part. I just can't seem to figure it out.
I have created an ASP.Net 2003 project with Log4net already (fine).
My global.asax has the following line:
void Application_Start(object sender, EventArgs e)
{
log4net.Config.DOMConfigurator.Configure();
}
Web config is provided below. Any ideas?
Thanks very much in advance.
--------Start Web.config----------------
<configSections>
<section name="log4net"
type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" />
</configSections>
<log4net>
<appender name="RollingLogFileAppender"
type="log4net.Appender.RollingFileAppender,log4net">
<param name="File"
value="C:\\Projects\\log4netexample\\LogFiles\\Log.txt"/>
<param name="AppendToFile" value="true"/>
<param name="MaxSizeRollBackups" value="10"/>
<param name="MaximumFileSize" value="5MB"/>
<param name="RollingStyle" value="Size"/>
<param name="StaticLogFileName" value="true"/>
<param name="Threshold" value="INFO" />
<layout type="log4net.Layout.PatternLayout,log4net">
<param name="ConversionPattern" value="%d [%t] %-5p %c [%x] -
%m%n"/>
</layout>
</appender>
<root>
<level value="ALL" />
<appender-ref ref="RollingLogFileAppender" />
</root>
</log4net>
<appSettings>
</appSettings>
<connectionStrings/>
<system.web>
<compilation debug="true"/>
<authentication mode="Forms">
</authentication>
</system.web>
</configuration>
--------------End Web.config---------------
_________________________________________________________________
Share your opinion and enter to win! Please complete this survey to enter
into a draw for a grand prize of $500 or one of twenty $50 cash prizes.
http://www.youthographyinsiders.com/R.aspx?a=116