Q:

Why is this service "not responding to the start or control request in a timely fashion"?

Background: A client has given me a third-party developed Windows service which they would like me to get running for them. However when I start the service, it times out and I get the 1053 "service did not respond ... timely fashion" error. 
I've reflected the assembly to get the code it is executing in its start method, but from a cursory glance it looks like it should return. 
Actual question: Can someone explain why this service is causing the 1053 error?
(Checking the log file has confirmed that the timer has been initialised and fires more than once before the service is terminated.)
private void InitTimers()
{
    if (this._config.RunMode == RunModes.Continuous)
    {
        this.srvcTimer.Interval = Math.Max(this._config.Interval.TotalSeconds, 1.0) * 1000.0;
    }
    else
    {
        this.srvcTimer.Interval = 60000.0;
    }
    this.srvcTimer.AutoReset = true;
    this.srvcTimer.Enabled = true;
}

A:

The service constructor must return in a "timely" fashion for the service to start successfully. This means that you can't start a potentially expensive operation in the constructor but must delegate it to another thread.
Typically you might find that connecting to a local database is fine when developing the service, but once you deploy it and have to connect across the internet you find that it fails.
Without seeing the exact code in the constructor I can't say for certain, but if you move that into a thread the service should start successfully. Obviously this means that you need to have some way of checking that the service has actually started properly and reporting the error to the main program from the thread.

