Service not going to 'Started'

  • Thread starter Thread starter minoad
  • Start date Start date
M

minoad

I have written a program that runs perfectly. I converted this to a
service. Upon starting the service, it will stay indefinantly on
"Starting" and never move to "Started". The wierd thing here is that
the service runs perfectly even though it says starting. Any ideas why
a service would nevere move to started, yet still runs exactly as it
should?

Thanks

Micah A. Norman
 
I have written a program that runs perfectly. I converted this to a
service. Upon starting the service, it will stay indefinantly on
"Starting" and never move to "Started". The wierd thing here is that
the service runs perfectly even though it says starting. Any ideas why
a service would nevere move to started, yet still runs exactly as it
should?

Did you place all your code into the On Starting Event?

Rather start a new thread, or use a timer... rather than looping inside the
onstarting event.

A service "starts" after the on starting event completes.
 
I always use a sub called "StartMyService" or something similar to place all
my code. Then in the OnStart event, I either start a timer to call
StartMyService, or use
System.Threading.Threadpool.QueueUserWorkItem(AddressOf StartMyService)
 
Back
Top