健康监测不起作用
我正在尝试在 Windows Server 2003 上运行的 IIS 6/ASP.NET 2 应用程序上设置运行状况监控。
我想做的第一步是除了默认事件之外还获取应用程序生命周期事件(如C:\Windows\Microsoft.NET\Framework\v2.0.50727\CONFIG\web.config)。
在我的开发机器上,运行 IIS 7 作为 Windows 7 上的 NetworkService,运行良好。
在 IIS 6 计算机上,默认事件仍会记录到事件日志中,但附加生命周期事件不会记录到事件日志中。此外,不会记录或显示有关错误配置的事件。此外,使用 SimpleMailProvider 而不是事件日志记录不会产生结果。
看起来它只是忽略了我的设置。我尝试了多种设置 - 甚至将所有全局健康监控设置复制到应用程序 web.config 中 - 但没有运气。
提前致谢!
这是我添加到 web.config 中的设置:
<healthMonitoring enabled="true">
<rules>
<clear />
<add name="All Errors Default" eventName="All Errors" provider="EventLogProvider" profile="Critical" />
<add name="Application Lifetime Events Default" eventName="Application Lifetime Events" provider="EventLogProvider" profile="Critical" />
<add name="Failure Audits Default" eventName="Failure Audits" provider="EventLogProvider" profile="Critical" />
</rules>
</healthMonitoring>
I am trying to set up health monitoring on an IIS 6/ASP.NET 2 application running on Windows Server 2003.
What I want to do for a first step, is getting the Application Lifetime Events in addition to the default events (as specified in C:\Windows\Microsoft.NET\Framework\v2.0.50727\CONFIG\web.config).
On my dev machine running IIS 7 as NetworkService on Windows 7 that works fine.
On the IIS 6 machine, the default events still get logged to the event log but the additional life time events do not. In addition, no events regarding misconfiguration get logged or shown. Also, using a SimpleMailProvider instead of the event logging does not produce results.
It looks like it is just ignoring my settings. I have tried many variations of settings - even copied all the global healthmonitoring settings into the application web.config - but no luck.
Thanks in advance!
Here is the settings I added to the web.config:
<healthMonitoring enabled="true">
<rules>
<clear />
<add name="All Errors Default" eventName="All Errors" provider="EventLogProvider" profile="Critical" />
<add name="Application Lifetime Events Default" eventName="Application Lifetime Events" provider="EventLogProvider" profile="Critical" />
<add name="Failure Audits Default" eventName="Failure Audits" provider="EventLogProvider" profile="Critical" />
</rules>
</healthMonitoring>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您的帐户 NetworkService 可能无权访问注册表 - 这是日志记录框架所必需的。
授予读/写访问权限:
并查看是否有帮助。
It may be possible that your account
NetworkService
does not have access to the registry - which is required by the logging framework.Grant read/write access to:
and see if that helps.