2

在开发环境中,我的 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);

有人有建议吗?如果这个问题含糊不清或需要更多信息,我很抱歉。我不确定从哪里开始解决此问题。我会添加任何要求的信息。

4

1 回答 1

0

应用程序池中的用户需要对日志目录具有写入权限,检查两个环境的权限是否相同。

于 2013-11-18T06:18:15.893 回答