Service unable to start

I've deployed a C# windows service using installutil. I can see the service in the mmc console but can't start it.

I'm getting this error, any ideas what is wrong or how to figure out?

Error 1053: The service did not respond to the start or control request in a timely fashion.
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

There are two KB articles that address this error:

Maybe one of them will present a solution for you.
It can also be a coding problem.  Your OnStart needs to complete within 30 seconds or you get that error.
craigdevAuthor Commented:
the onstart function has a timer that ticks every 2 hours

also, when the service 'starts' there is not a 30 sec wait - it just stops straight away with that error

how are you supposed to debug services, anyway? how do i get exceptions or meaningful error messages?

You need to catch exceptions in OnStart and your timer tick events, and log them in some reliable fashion.  To debug a service, my preferred approach is at the end of this:

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.