Can I count on this ASP.NET event log source always being registered?

梦想与她 提交于 2019-12-10 11:35:35

问题


Unhandled exceptions cause ASP.NET-based applications to unexpectedly quit in the .NET Framework 2.0 makes me think that an event log source named with the following convention will always be registered on any box where the .NET Framework has been installed:

"ASP.NET X.Y.Z.0"

Where X, Y, and Z are the major, minor, and build numbers from the .NET runtime.

Is it safe to assume that the installation of the .NET Framework will always create this event log source?


回答1:


This event log source is installed by ASP.NET as part of ASP.NET Health Monitoring. In particular, it is written to by the EventLogProvider.




回答2:


Possibly. However I think that all events in windows are stored in the event log. By default .NET's built-in trace listener writes application events to the event log whenever an error occurs. You can see where the log is located in your registry, or view the logs with the Event Viewer.

Click Start, click Run, type regedt32, and then click OK.

On the Windows menu, click HKEY_LOCAL_ MACHINE on Local Machine.

For the System log:

Click the System\CurrentControlSet\Services\EventLog\System folder, and then double-click the FILE value.

For the Application log:

Click the System\CurrentControlSet\Services\EventLog\Application folder, and then double-click the FILE value.

For the Security log:

Click the System\CurrentControlSet\Services\EventLog\Security folder, and then double-click the FILE value.



来源:https://stackoverflow.com/questions/4165686/can-i-count-on-this-asp-net-event-log-source-always-being-registered

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!