Phil Haack explain in detaile here configuring log4net in asp.net 2.0. The thing is we need to tell log4net, where its configuration is kept. There are two approach,
- keep this info in the assemblyinfo.cs as attributes, or
- use XmlConfigurator.Configure() in Application_start() event.
The issue is If we follow the first approach, the log4net.dll can be kept in either webapp\bin directory or in GAC, whereas if we follow the second approach, it ONLY works when the assembly in the webapp\bin directory.
So If your log4net is not working, eventhough you kept the file in GAC, keep th file in the bin directory and mostly it works!
Cheers,
Murugan G.