Log4net not registering when deploying my web application
I have a web application that uses log4net to log errors to a log file. It works well when I publish my site via xcopy, but when I create the package installer, log4net doesn't work when remote users access my site.
I am using impersonate = true in my web.config and log4net only logs errors when I am a logged in user.
I have another application that works fine in all cases, but has not been deployed.
Does anyone have any thoughts?
I don't think so because the same configuration is used in production application
but here
which user is using log4net when writing to disk ?! Do I need to add write permissions to the log folders? Since I'm using impersonate = true, the user logged into the site is the one log4net uses to write for the correct filesystem ?!
<!-- log4net -->
<log4net debug="false">
<appender name="RollingFileAppender" type="log4net.Appender.RollingFileAppender">
<file value="D:\\WSBank\\Solution\\Logs\\Solution.log" />
<appendToFile value="true" />
<rollingStyle value="Size" />
<maxSizeRollBackups value="10" />
<maximumFileSize value="1024KB" />
<staticLogFileName value="true" />
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%date [%thread] %-5level %logger [%property{NDC}] - %message%newline" />
</layout>
</appender>
<root>
<level value="ALL" />
<appender-ref ref="RollingFileAppender" />
</root>
</log4net>