Ouch, nice of you to point this out.
[quoted text, click to view] On Thu, 28 Apr 2005 11:26:14 +0200, Andy Fish <ajfish@blueyonder.co.uk> wrote:
> Sorry to shout, but I'll bet this is a common mistake when programming
> windows services (or anything that uses the event log). I didn't really
> think of it until our demo system wouldn't start up just before an important
> demo.
>
> What happened was this:
>
> 1. the service started OK
> 2. it tried to log a message saying it had started ok
> 3. the event log was full so WriteEntry threw an exception
> 4. the service caught the exception and tried to write an event log entry
> saying there had been an exception
> 5. the event log was full so WriteEntry threw an exception again
> 6. the service died
>
> Net effect: every time you try to start the service, it fails with nothing
> logged in the event log - very difficult to troubleshoot.
>
> Just like you, I could have predicted what would happen but I didn't think
> of it until it was too late.
>
> Do yourself a favor, have a look at all your code which writes to the event
> log (especially exception handling code) and ask what would happen if the
> event log was full.
>
> Andy
>
>
>
--
Happy coding!