A
Arnie
We're using the ServiceController class provided by the .NET Framework,
programming in C#. We are using the Start() method to start a service from
another service. This works fine most of the time, but occasionally after a
system startup (where the service doing the starting of the other is
automatically started by Windows XP) the ServiceController's Start() method
fails to start the other service. It is probably throwing an
InvalidOperationException in these cases (we know it is in some cases). Is
there any way to tell why Windows cannot start the service, and are there
known problems with the reliability of the Start() method? It works most of
the time, but occasionally after unsealing the XP OS, or after a restart,
this fails. We're trying retries of calls to the Start() method, but after
3 retries it still fails inexplicably.
We need to find out if:
1.. this is a known problem
2.. how long does it wait, and is this wait time adequate?
3.. can this happen if one of the services upon which the service being
started depends takes too long to start? We are quite sure the actual
service being started takes almost no time to execute its two lines that
consist of starting a worker thread in its OnStart() method.
4.. is there some reason this would only occur after an unseal or system
restart (that's the only time we see it)?
5.. there are any known fixes or workarounds to this problem
programming in C#. We are using the Start() method to start a service from
another service. This works fine most of the time, but occasionally after a
system startup (where the service doing the starting of the other is
automatically started by Windows XP) the ServiceController's Start() method
fails to start the other service. It is probably throwing an
InvalidOperationException in these cases (we know it is in some cases). Is
there any way to tell why Windows cannot start the service, and are there
known problems with the reliability of the Start() method? It works most of
the time, but occasionally after unsealing the XP OS, or after a restart,
this fails. We're trying retries of calls to the Start() method, but after
3 retries it still fails inexplicably.
We need to find out if:
1.. this is a known problem
2.. how long does it wait, and is this wait time adequate?
3.. can this happen if one of the services upon which the service being
started depends takes too long to start? We are quite sure the actual
service being started takes almost no time to execute its two lines that
consist of starting a worker thread in its OnStart() method.
4.. is there some reason this would only occur after an unseal or system
restart (that's the only time we see it)?
5.. there are any known fixes or workarounds to this problem