If you actually want to use more than 1 processor for a website on your fancy multi-processor server (IIS calls this a “web garden” because marketers like to brand new terms for existing technologies), and you’re using a log4net file appender, a default configuration will cause problems for you as your separate web server processes run into locks on the same log file. To avoid this, you’ll need to configure log4net to put the PID in the filename:
<appender name="RollingLogFileAppender" type="log4net.Appender.RollingFileAppender">
. . .
<file type="log4net.Util.PatternString" value="C:\\IISLogs\\project\\log.pid.%processid.d" />
. . .
<datePattern value="yyyyMMdd'.txt'" />
Unfortunately, this ruins easy filename based date sorting. Don’t know how to do anything about that.
I recommend avoiding the ‘MinimalLock’ configuration that you will see mentioned in google searches. It opens and closes the file for every log message; while I haven’t tested this specifically with log4net, I have run into several apps in the past that ruined their performance by excessive file opening and seeking.