Service unable to start

Posted on 2008-11-05
Last Modified: 2012-08-14
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.
Question by:craigdev
    LVL 35

    Expert Comment

    There are two KB articles that address this error:

    Maybe one of them will present a solution for you.
    LVL 21

    Expert Comment

    It can also be a coding problem.  Your OnStart needs to complete within 30 seconds or you get that error.
    LVL 1

    Author Comment

    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?

    LVL 21

    Accepted Solution

    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:

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Why You Should Analyze Threat Actor TTPs

    After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

    Introduction This article series is supposed to shed some light on the use of IDisposable and objects that inherit from it. In essence, a more apt title for this article would be: using (IDisposable) {}. I’m just not sure how many people would ge…
    Introduction Although it is an old technology, serial ports are still being used by many hardware manufacturers. If you develop applications in C#, Microsoft .NET framework has SerialPort class to communicate with the serial ports.  I needed to…
    To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
    Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

    761 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    8 Experts available now in Live!

    Get 1:1 Help Now