To demonstrate the fix let's run through the basic steps for adding Log4Net to a web project with an AdoNetAppender.
Download the latest release of Log4Net (http://logging.apache.org/log4net/download.html) and add a reference to the downloaded Log4Net release dll to your web project.
Add the relevant configuration settings to your web projects Web.config file for Log4Net and include an AdoNetAppender.
Inform the Log4Net library that it should be looking in the Web.config for its configuration settings by adding the following code to your Global.asax.
Finally somewhere in your application code try and log something.
In order to test this set up under shared hosting conditions you should also add the following config setting to your Web.config file to run the web application with medium trust privileges.
Now fire up the web application and you will see the following Log4Net error whenever it tries to log anything via the AdoNetAppender.
|Visual Studio Output Window|
Now replace the referenced Log4Net dll in your web project with the dll produced by building the latest branch code.
Re run your web application and hey presto, no Log4Net error. You should start to see rows appearing in your database log table.
|Log Table Select Query|