Does your TraceListener have write access to the place where its trying to
create a file? If you're having file permission issues, why not record the
debug messages in memory then inspect them later (i.e. use Response.Write to
print them out):
// untested
public class MessagesTraceListener : TraceListener
{
private static IList messages = ArrayList.Synchronized(new ArrayList());
public override void Write(string message)
{
messages.Add(message);
}
public override void WriteLine(string message)
{
messages.Add(message);
}
public static IList Messages
{
get { return messages; }
}
}
----- Original Message ----
From: vikram srinivasan <[EMAIL PROTECTED]>
To: [email protected]
Sent: Wednesday, February 20, 2008 8:01:53 AM
Subject: log4net .NET 1.1 problem
Hi,
I am trying to deploy an application that uses log4net.dll version 1.2.0.22663.
The .NET FW that I use is 1.1 and running against IIS 6.0 on Windows 2003.
The trouble is there is no log file being created when I run the application
against 1.1. However, if I switch the application to use 2.0, everything is
fine. Due to circumstances, I cannot switch my app to 2.0 on production.
I would like to know where I can see any log4net initialisation errors. I did
to turn on internal debugging. But system.diagnostics doesnt seem to work with
1.1 for some reason. I get the following error,
-----------------------------------------------------
Configuration Error
Description: An error occurred during the processing of a configuration file
required to service this request. Please review the specific error details
below and modify your configuration file appropriately.
Parser Error Message: Exception in configuration section handler.
Source Error:
Line 182: <globalization requestEncoding="utf-8"
responseEncoding="utf-8"/>
Line 183: </system.web>
Line 184: <system.diagnostics>
Line 185: <trace autoflush="true">
Line 186: <listeners>
Source File: E:\Plumtree\ptntcws\6.0\webapp\ntcws\web.config Line: 184
-----------------------------------------------------
Could someone please help me with this?
Thanks,
Vikram