Tuesday, October 9, 2007

How to enable Log4net in IIS6.0 , Windows 2003

By default IIS 6.0 does not allow log4net to write logs to file. To enable this some permissions settings has to be changed.

The following steps will do that.

1. Select the virtual directory or website in IIS to which you want enable logs.

2. Select the permissions for that application and add IIS_WPG and give write permission to this account.

3. Go to LocalUsers and groups snap in using mmc command in window and add the current windows-login user to IIS_WPG group.

Now log4net should work fine :)