PC Review


Reply
Thread Tools Rate Thread

Automatic startup of service

 
 
Jeremy Chapman
Guest
Posts: n/a
 
      4th Jan 2005
I built a service in visual studio 2003 for the 1.1 framework. I used the
wizard. For the most part this service works great, and has for several
months, except for when the service restarts. on a 2003 server the service
starts up fine. on a 2000 server I get an event log errors: There's
nothing really that this service does that takes longer than 30 seconds. I
can manually start this service no problem, but I need it to start when the
server starts.

The MyService service failed to start due to the following error:
The service did not respond to the start or control request in a timely
fashion.

Timeout (30000 milliseconds) waiting for the MyService service to connect.


 
Reply With Quote
 
 
 
 
John Saunders
Guest
Posts: n/a
 
      4th Jan 2005
"Jeremy Chapman" <(E-Mail Removed)> wrote in message
news:u$(E-Mail Removed)...
>I built a service in visual studio 2003 for the 1.1 framework. I used the
> wizard. For the most part this service works great, and has for several
> months, except for when the service restarts. on a 2003 server the
> service
> starts up fine. on a 2000 server I get an event log errors: There's
> nothing really that this service does that takes longer than 30 seconds.
> I
> can manually start this service no problem, but I need it to start when
> the
> server starts.
>
> The MyService service failed to start due to the following error:
> The service did not respond to the start or control request in a timely
> fashion.
>
> Timeout (30000 milliseconds) waiting for the MyService service to
> connect.


Try doing as little as possible in your start method and see if the problem
goes away. In particular, as a debug technique, try removing all of the code
from the start method and see if the problem persists on W2K.

John Saunders


 
Reply With Quote
 
Trevor Braun
Guest
Posts: n/a
 
      5th Jan 2005
Your service doesn't depend on another service like MSSQL or something? If
so, make sure you add the required service(s) to the ServicesDependedUpon
string array in the ServiceInstaller.

Trevor Braun

"Jeremy Chapman" <(E-Mail Removed)> wrote in message
news:u$(E-Mail Removed)...
>I built a service in visual studio 2003 for the 1.1 framework. I used the
> wizard. For the most part this service works great, and has for several
> months, except for when the service restarts. on a 2003 server the
> service
> starts up fine. on a 2000 server I get an event log errors: There's
> nothing really that this service does that takes longer than 30 seconds.
> I
> can manually start this service no problem, but I need it to start when
> the
> server starts.
>
> The MyService service failed to start due to the following error:
> The service did not respond to the start or control request in a timely
> fashion.
>
> Timeout (30000 milliseconds) waiting for the MyService service to
> connect.
>
>



 
Reply With Quote
 
Jeremy Chapman
Guest
Posts: n/a
 
      10th Jan 2005
Brilliant!

Turns out I had to add Eventlog and RemoteRegistry to the
ServicesDependedUpon property. Thanks.


"Trevor Braun" <(E-Mail Removed)> wrote in message
news:#IJ$(E-Mail Removed)...
> Your service doesn't depend on another service like MSSQL or something?

If
> so, make sure you add the required service(s) to the ServicesDependedUpon
> string array in the ServiceInstaller.
>
> Trevor Braun
>
> "Jeremy Chapman" <(E-Mail Removed)> wrote in message
> news:u$(E-Mail Removed)...
> >I built a service in visual studio 2003 for the 1.1 framework. I used

the
> > wizard. For the most part this service works great, and has for several
> > months, except for when the service restarts. on a 2003 server the
> > service
> > starts up fine. on a 2000 server I get an event log errors: There's
> > nothing really that this service does that takes longer than 30 seconds.
> > I
> > can manually start this service no problem, but I need it to start when
> > the
> > server starts.
> >
> > The MyService service failed to start due to the following error:
> > The service did not respond to the start or control request in a timely
> > fashion.
> >
> > Timeout (30000 milliseconds) waiting for the MyService service to
> > connect.
> >
> >

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Windows Service using VB.Net automatic startup problem ! =?Utf-8?B?UmF2aSBTaGFua2Fy?= Microsoft VB .NET 6 30th May 2006 03:53 PM
Installing service with automatic startup from command prompt =?Utf-8?B?YWFh?= Windows XP Security 2 23rd Nov 2005 04:41 PM
Installing service with automatic startup from command prompt =?Utf-8?B?YWFh?= Windows XP Setup 1 23rd Nov 2005 04:41 PM
Automatic Service Startup Prioritization or Delay Options =?Utf-8?B?RXJpaw==?= Microsoft Windows 2000 1 25th Jun 2005 10:54 PM
Control login or automatic service startup =?Utf-8?B?Tm9ybWE=?= Windows XP Embedded 4 27th May 2005 05:56 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:14 PM.