I’ve got an app which I’ve tested as working as a console application.
I’ve now converted this to a Windows service, installed it, run it, and it still does it job.
However, it always has a status of Starting. There doesn’t seem to be any logical flag to set on the ServiceBase.
I’ve setup the service with a bool isRunning flag, and the program runs within a
while (isRunning) {} block.
Are you blocking the return of
OnStart?Normally one would spawn a thread from there to do the work, and let the method return.