J
Jason Barnett
I created a Windows service with a worker thread which performs some work
every 5 minutes; sleeping in between. Everytime it performs the work, it
writes a status to a log file. The service runs fine most of the time, but
sometimes it seems to do nothing; the status in Services Manager is
"Started", but the log file is no longer updated with a status.
All errors are written to the log file and to the Event Log using a
try...catch block at the main entry point (main method) and using a
UnhandledExceptionEventHandler (initialized upon entering the main method.
However, no errors appear in the log file when the status stops getting
written.
I suspect that the thread is ending abnormally, but the main process is not.
I'm not sure what step to take next to ensure this service runs more
reliably. Could someone offer some suggestions?
every 5 minutes; sleeping in between. Everytime it performs the work, it
writes a status to a log file. The service runs fine most of the time, but
sometimes it seems to do nothing; the status in Services Manager is
"Started", but the log file is no longer updated with a status.
All errors are written to the log file and to the Event Log using a
try...catch block at the main entry point (main method) and using a
UnhandledExceptionEventHandler (initialized upon entering the main method.
However, no errors appear in the log file when the status stops getting
written.
I suspect that the thread is ending abnormally, but the main process is not.
I'm not sure what step to take next to ensure this service runs more
reliably. Could someone offer some suggestions?