Hey all,
I wrote a Windows Service. When I test it on my developement machine (winXP)
it works fine. It starts ok, never crashes, etc.
When I install the service on another machine (win2000) it *sometimes*
crashes upon starting. The progressbar you get when you manually start the
server will very slowly progress, and when it hits 100% after 2 minutes or
something I get the error 'The service could not be started because it did
not respond in a timely manner' or something like that. No eventvwr error
codes, nothing. The status of the service keeps saying 'starting' and the
funniest thing is, sometimes it actually WILL run in the background (I can
check that because of log files etc). However, I can't stop the service
after that, because the stop / start buttons are grayed out, I can't
terminate the process from the task manager (access denied). And when it
does NOT crash, it keeps running flawlessly until the machine is rebooted,
or I manually terminate it.
So two questions:
- Why does it *sometimes* crash on the win2000 server? It doesn't do any
fancy stuff, just connect to a database, copy some data, etc.
- IF it crashes, is there any way to terminate the service when it stopped
responding? Having to reboot the machine is a pain, especially when the
server uptime is an important thing.
Thank you!
Razzie