在开发环境中,我的Web应用程序正在正确记录所有消息。在舞台环境中,会记录global.asax中的session_end事件,但不记录global.asax以外的任何内容。在开发时,我可以看到一个基本日志,当我启动应用程序显示我登录时,但没有任何阶段。
-code is same in both environments
-.NET 4.0 web application deployed to IIS
-log4net.config is same in both environments
-logs to text file on same drive as application that runs it
-logger is instantiated in static class, used through whole application.
-global.asax application_start configures logger by building FileInfo object that points to log4net.config and doing this log4net.Config.XmlConfigurator.ConfigureAndWatch(file);
有没有人有任何建议?如果这个问题含糊不清或需要更多信息,我很抱歉。我不确定从哪里开始对此进行故障排除。我会添加任何要求的信息。
答案 0 :(得分:0)
应用程序池中的用户需要具有对日志记录目录的写权限,请检查两个环境的权限是否相同。