Home All Groups Group Topic Archive Search About

Windows Service not starting automatically

Author
30 Oct 2006 10:00 PM
Ashley Bryant
I've created a Windows Service in vb.net that is set up to run automatically,
but it never starts during system startup.  I can start it manually, but I
need the service to start without any user interaction.  When I originally
installed the service, I had to attempt the start twice as well from the
Service Manager.  So, for some odd reason, it has to be told twice to start.

I get the following errors in the System log at startup:

Timeout (30000 milliseconds) waiting for the LU/LW Mail Service service to
connect.

- and -

The LU/LW Mail Service service failed to start due to the following error:
The service did not respond to the start or control request in a timely
fashion.

I'm not sure what's causing the service to time out like that, and I don't
know where to start looking to fix it.

Any ideas?

Author
30 Oct 2006 10:29 PM
Izzy
We'll need code to help with the problem.

Ashley Bryant wrote:
Show quoteHide quote
> I've created a Windows Service in vb.net that is set up to run automatically,
> but it never starts during system startup.  I can start it manually, but I
> need the service to start without any user interaction.  When I originally
> installed the service, I had to attempt the start twice as well from the
> Service Manager.  So, for some odd reason, it has to be told twice to start.
>
> I get the following errors in the System log at startup:
>
> Timeout (30000 milliseconds) waiting for the LU/LW Mail Service service to
> connect.
>
> - and -
>
> The LU/LW Mail Service service failed to start due to the following error:
> The service did not respond to the start or control request in a timely
> fashion.
>
> I'm not sure what's causing the service to time out like that, and I don't
> know where to start looking to fix it.
>
> Any ideas?
Author
1 Nov 2006 8:19 PM
Ashley Bryant
Sorry I haven't responded yet.  Work's a bit hectic at month-end.

http://www.omahanightlife.com/images/Ash/mailservice.zip

Show quoteHide quote
"Izzy" wrote:

> We'll need code to help with the problem.
>
> Ashley Bryant wrote:
> > I've created a Windows Service in vb.net that is set up to run automatically,
> > but it never starts during system startup.  I can start it manually, but I
> > need the service to start without any user interaction.  When I originally
> > installed the service, I had to attempt the start twice as well from the
> > Service Manager.  So, for some odd reason, it has to be told twice to start.
> >
> > I get the following errors in the System log at startup:
> >
> > Timeout (30000 milliseconds) waiting for the LU/LW Mail Service service to
> > connect.
> >
> > - and -
> >
> > The LU/LW Mail Service service failed to start due to the following error:
> > The service did not respond to the start or control request in a timely
> > fashion.
> >
> > I'm not sure what's causing the service to time out like that, and I don't
> > know where to start looking to fix it.
> >
> > Any ideas?
>
>
Author
30 Oct 2006 10:36 PM
Chris Dunaway
Ashley Bryant wrote:
Show quoteHide quote
> I've created a Windows Service in vb.net that is set up to run automatically,
> but it never starts during system startup.  I can start it manually, but I
> need the service to start without any user interaction.  When I originally
> installed the service, I had to attempt the start twice as well from the
> Service Manager.  So, for some odd reason, it has to be told twice to start.
>
> I get the following errors in the System log at startup:
>
> Timeout (30000 milliseconds) waiting for the LU/LW Mail Service service to
> connect.
>
> - and -
>
> The LU/LW Mail Service service failed to start due to the following error:
> The service did not respond to the start or control request in a timely
> fashion.
>
> I'm not sure what's causing the service to time out like that, and I don't
> know where to start looking to fix it.
>
> Any ideas?

Does your service depend on any other services being started first? If
so, you need to set your service up so it knows to wait for those
services.
Author
1 Nov 2006 8:20 PM
Ashley Bryant
Nope.  It's completely stand-alone.  I posted my code in reply to Izzy for
reference.

Show quoteHide quote
"Chris Dunaway" wrote:

> Ashley Bryant wrote:
> > I've created a Windows Service in vb.net that is set up to run automatically,
> > but it never starts during system startup.  I can start it manually, but I
> > need the service to start without any user interaction.  When I originally
> > installed the service, I had to attempt the start twice as well from the
> > Service Manager.  So, for some odd reason, it has to be told twice to start.
> >
> > I get the following errors in the System log at startup:
> >
> > Timeout (30000 milliseconds) waiting for the LU/LW Mail Service service to
> > connect.
> >
> > - and -
> >
> > The LU/LW Mail Service service failed to start due to the following error:
> > The service did not respond to the start or control request in a timely
> > fashion.
> >
> > I'm not sure what's causing the service to time out like that, and I don't
> > know where to start looking to fix it.
> >
> > Any ideas?
>
> Does your service depend on any other services being started first? If
> so, you need to set your service up so it knows to wait for those
> services.
>
>