Re: Windows service staying in "Starting" status!
Quote:
Originally Posted by
HausNL
@arjay
Haven't tryed that, but whats the purpose of doing that?
The purpose of doing that would be to find exactly the issue of why your code was failing. As you've found out, the OnStart method needs to return so if your underlying code doesn't return, the SCM is going to give you a did not start in time status.
If you had created a empty service like I suggested, you then get the service and registration code debugged and working before you add the 'real' code. That way any initial startup problems can be traced to an installation or registration error.
Once you get that working, then you add the 'real' code to the service and if it stops working you then know it's in the code you've added.