I do have a bunch of windows services (written in C#) that all use the same pattern - there's a class library which has a public Start and Stop method - and those methods are called by my service wrapper at the appropriate point in time. The class lib also
has a main method and can run as standalone software - it's just a project configuration switch to decide if I want the actual program logic as a dll or an exe.
So far so good - in recent days I made some changed to one of my services that had been running just fine on dozens of machines. When I wanted to upgrade though, I ran into some issues. My staging box is a W2K3 R2 box, and there I had no trouble running
the newly compiled service (the service .exe file was left.. but dll was changed). Then I went to our production machines which use W2K8 R2, and then the following happend:
The service controller reports that the service cannot be started. In the Event Viewer, I see an event 7009 ("A timeout was reached (30000 milliseconds) while waiting for the xyz service to connect"), then followed by an event 7000 ("The xyz
service failed to start due to the following error: The service did not respond to the start or control request in a timely fashion").
I then went ahead and changed the output type of my dll project to commandline, added the exe to the path where the service resid
View Complete Post