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.
LVL 1
craigdevAsked:
Who is Participating?
 
mastooConnect With a Mentor Commented:
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:

http://www.experts-exchange.com/Programming/Languages/.NET/Visual_Basic.NET/Q_22082069.html
0
 
torimarCommented:
There are two KB articles that address this error:
http://support.microsoft.com/kb/886695
http://support.microsoft.com/kb/839174

Maybe one of them will present a solution for you.
0
 
mastooCommented:
It can also be a coding problem.  Your OnStart needs to complete within 30 seconds or you get that error.
0
 
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?



0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.