471,350 Members | 1,925 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,350 software developers and data experts.

How-to make an EventLog in OnShutdown windows service?


does anyone know, how to make an EventLog in service event OnShutdown?

It seems that OnShutdown cannot make an entry to the
eventlog.writeentry(). Even when Eventlog is listed in the service
property DependsOn, still not works.

Any idea? Thank you.



C # / .NET 2.0 / XP Pro SP 3

protected override void OnShutdown()
EventLog.WriteEntry("OnShutdown"); // exception
catch { }
Jun 27 '08 #1
0 1157

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Tom Szabo | last post: by
15 posts views Thread by Reid Nichol | last post: by
2 posts views Thread by Frances Del Rio | last post: by
4 posts views Thread by Supra | last post: by
reply views Thread by candra | last post: by
2 posts views Thread by belred | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.