In our organization we use log4net for all our .NET 1.1 applications. For our new projects we use Visual Studio 2005. At this moment there is no public version that supports the .NET 2.0 framework.

In the log4net mailing list people claim you can use the current version but this is only partially true:
It’s true, for application running with trust level full,
but it’s false, for all other trust levels.

When the trust level is set to something other then “Full” a Security Exception will be thrown.

Trustlevels in .NET 1.1

If you want to build a secure ASP.NET Application you do not want your application running with full trust.

A message in the log4net mailing list suggested downloading the latest sources from the subversion repository and build the latest log4net version. The only thing that had to be changed was the build conditional compilation symbol ( from "NET;NET_1_0" to "NET;NET_2_0" ).

Well actually there was a bit more. It turned out that I missed the NUnit Framework (running VS2005 TS) and there was a reference missing to the System.Configuration assembly. After installing the NUnit and setting the references I had a version that compiled without errors or warnings. The next step was running some tests, the results are in the table below.

In our organization we use log4net for all our .NET 1.1 applications. For our new projects we use Visual Studio 2005. At this moment there is no version that supports the .NET 2.0 framework.

In the log4net mailing list people claim you can use the current version but this is only partially true:
It’s true, for application running with trust level full,
but it’s false, for all other trust levels.

When the trust level is set to something other then “Full” a Security Exception will be thrown.

Trustlevels in .NET 2.0

If you compare the two versions you see that the exceptions are gone. Not only the exceptions are gone but there is also no logging in these situations. No logging is obvious but the fact that the “Security Exception” is missing bothers me.

I hope the exception returns in a future version. For now I’m glad we can use log4net again. You can download the bits but keep in mind that this is not an official release.