Home All Groups Group Topic Archive Search About

Service not going to 'Started'

Author
17 Sep 2006 5:30 PM
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

Author
17 Sep 2006 6:09 PM
Spam Catcher
"minoad" <min***@gmail.com> wrote in news:1158514217.125403.115880
@i3g2000cwc.googlegroups.com:

> 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.
Author
17 Sep 2006 6:55 PM
minoad
No, but i did place the refrence to my 'Start' procedure.

Micah A. Norman
Author
17 Sep 2006 8:17 PM
Terry Olsen
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)

Show quoteHide quote
"minoad" <min***@gmail.com> wrote in message
news:1158519330.606468.149780@k70g2000cwa.googlegroups.com...
> No, but i did place the refrence to my 'Start' procedure.
>
> Micah A. Norman
>
Author
18 Sep 2006 1:27 AM
minoad
Thank you very much, the queue did the trick.

Micah A. Norman