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 Andrew Steiger <An...@refinery.com> on 2006/02/16 00:25:20 UTC

Problem with log4net

I have created a test console application...

 

using System;

using log4net;

 

namespace ConsoleApplication1

{

      /// <summary>

      /// Summary description for Class1.

      /// </summary>

      class Class1

      {

            /// <summary>

            /// The main entry point for the application.

            /// </summary>

            [STAThread]

            static void Main(string[] args)

            {

                  log4net.Config.BasicConfigurator.Configure();

                  Console.WriteLine("Hello World");

                  Console.ReadLine();

            }

      }

}

 

When I run this class I get a SecurityException from an unknown module.
If I remove the log4net.Config.BasicConfigurator.Configure() line, the
app runs through fine.

 

Any ideas what could be causing this error?

 

Thanks in advance...

 

Andrew. 

andrew.steiger
software engineer
267.615.2210 

refinery
top 30 US interactive agency
http://www.refinery.com/whitepapers.aspx

Re: Problem with log4net

Posted by Ron Grabowski <ro...@yahoo.com>.
Your program runs fine with the latest build of log4net from
svn.apache.org, Visual Studio 2003, .NET 1.1, and Windows XP
Professional.

--- Andrew Steiger <An...@refinery.com> wrote:

> I have created a test console application...
> 
>  
> 
> using System;
> 
> using log4net;
> 
>  
> 
> namespace ConsoleApplication1
> 
> {
> 
>       /// <summary>
> 
>       /// Summary description for Class1.
> 
>       /// </summary>
> 
>       class Class1
> 
>       {
> 
>             /// <summary>
> 
>             /// The main entry point for the application.
> 
>             /// </summary>
> 
>             [STAThread]
> 
>             static void Main(string[] args)
> 
>             {
> 
>                   log4net.Config.BasicConfigurator.Configure();
> 
>                   Console.WriteLine("Hello World");
> 
>                   Console.ReadLine();
> 
>             }
> 
>       }
> 
> }
> 
>  
> 
> When I run this class I get a SecurityException from an unknown
> module.
> If I remove the log4net.Config.BasicConfigurator.Configure() line,
> the
> app runs through fine.
> 
>  
> 
> Any ideas what could be causing this error?
> 
>  
> 
> Thanks in advance...
> 
>  
> 
> Andrew. 
> 
> andrew.steiger
> software engineer
> 267.615.2210 
> 
> refinery
> top 30 US interactive agency
> http://www.refinery.com/whitepapers.aspx
>