|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Automatic startup of serviceI 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.
Show quote
Hide quote
"Jeremy Chapman" <NoSpam@Please.com> wrote in message Try doing as little as possible in your start method and see if the problem news:u$nhb4q8EHA.2572@tk2msftngp13.phx.gbl... >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. 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 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 Show quoteHide quote "Jeremy Chapman" <NoSpam@Please.com> wrote in message news:u$nhb4q8EHA.2572@tk2msftngp13.phx.gbl... >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. > > Brilliant!
Turns out I had to add Eventlog and RemoteRegistry to the ServicesDependedUpon property. Thanks. Show quoteHide quote "Trevor Braun" <tbraun_nospam4me@codetrue.com> wrote in message news:#IJ$Cns8EHA.2540@TK2MSFTNGP09.phx.gbl... > 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" <NoSpam@Please.com> wrote in message > news:u$nhb4q8EHA.2572@tk2msftngp13.phx.gbl... > >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. > > > > > >
Other interesting topics
general question regarding when to abstract vs. interface
Proper place for custom CONFIG file Exporting registry key to a reg file? Quick Questions on threading String conversion from an Object in VB.NET Enum conversion from an Object in VB.NET Error 1937 on VS installation Silent install of .Net Framework 1.1 Who is my calling object? Change of .NET framework website |
|||||||||||||||||||||||