J
jmagaram
I've written a .net Windows service in C#. It works most of the time for most
people. It is configured to automatically start when Windows boots. Sometimes
it fails to start on Windows XP during boot. All I know is that it is timing
out. But no useful details appear in the event log, not even my first
EventLog message in OnStart. How can I figure out why it isn't starting? How
can I fix this?
My ServiceBase constructor just sets a few properties. The first few lines
of OnStart are...
EventLogTraceListener logListener = new
EventLogTraceListener("TimesUpKidz");
Trace.Listeners.Add(logListener);
try { Trace.WriteLine("Starting"); } catch { }
This message does not show up in the EventLog. The log is nearly empty, so
there is no chance of it being full and losing messages.
These are two errors in the System EventLog:
Timeout (30000 milliseconds) waiting for the TimesUpKidz service to
connect.
Service Control Manager Error Event ID 7009
The TimesUpKidz service failed to start due to the following error:
The service did not respond to the start or control request in a timely
fashion.
Service Control Manager Error Event ID 7000
One theory I have is that maybe it is taking a very long time to load the
..net plumbing. I made my service dependent on:
winmgmt (Windows Management Instrumentation)
termservice (Terminal Services)
The service uses Remoting.
people. It is configured to automatically start when Windows boots. Sometimes
it fails to start on Windows XP during boot. All I know is that it is timing
out. But no useful details appear in the event log, not even my first
EventLog message in OnStart. How can I figure out why it isn't starting? How
can I fix this?
My ServiceBase constructor just sets a few properties. The first few lines
of OnStart are...
EventLogTraceListener logListener = new
EventLogTraceListener("TimesUpKidz");
Trace.Listeners.Add(logListener);
try { Trace.WriteLine("Starting"); } catch { }
This message does not show up in the EventLog. The log is nearly empty, so
there is no chance of it being full and losing messages.
These are two errors in the System EventLog:
Timeout (30000 milliseconds) waiting for the TimesUpKidz service to
connect.
Service Control Manager Error Event ID 7009
The TimesUpKidz service failed to start due to the following error:
The service did not respond to the start or control request in a timely
fashion.
Service Control Manager Error Event ID 7000
One theory I have is that maybe it is taking a very long time to load the
..net plumbing. I made my service dependent on:
winmgmt (Windows Management Instrumentation)
termservice (Terminal Services)
The service uses Remoting.