Re: Windows Service AutoStart Problem (C#)
- From: Claudio Grazioli <newsgroups@xxxxxxxxxxxxxxx>
- Date: Tue, 12 Apr 2005 10:22:42 +0200
On Mon, 11 Apr 2005 23:58:01 -0700, VinSand wrote:
Hi
> I have a problem on some machines to AutoStart a very simple windows service.
> It just logs a line in the event log when the OnStart and OnStop occurs.
> The service is setup as "Automatic" / Localsystem Accoutn.
>
> The machines where the service does not autmatic start are member of a
> domain (and have restricted policies).
>
> When I start or stop the service via SCM it works perfectly..
> BUT it does NOT start after a reboot !!
> (When it does not start after a reboot, I can still start it manualy via the
> SCM without a problem)
>
> I tried to "automatic" start it with my own (administrator) account also,
> but it gives the same errors in the eventlog !.
>
> Does anyone have an idea ?
> I am searching for almost four days now to solve it.
>
> Plz help me !.
>
> I get the following errors in the event log:
> -------------------------------------------------
>
> Event Type: Error
> Event Source: Service Control Manager
> Event Category: None
> Event ID: 7000
> Date: 4/5/2005
> Time: 6:16:31 PM
> User: N/A
> Computer: N956076C
> Description:
> The MyNewService service failed to start due to the following error:
> The service did not respond to the start or control request in a timely
> fashion.
>
> Event Type: Error
> Event Source: Service Control Manager
> Event Category: None
> Event ID: 7009
> Date: 4/5/2005
> Time: 6:16:31 PM
> User: N/A
> Computer: N956076C
> Description:
> Timeout (30000 milliseconds) waiting for the MyNewService service to connect.
>
> Thanks in advance for the replies on this subject.
I think the problem may be that you try to write to the EventLog but the
EventLog service it self is not started yet.
You have to make sure, your service is not started before the EventLog
service started successfully. Thus you have to make your service dependent
on the EventLog service. See this article on MSDN on how to do that:
http://support.microsoft.com/default.aspx?scid=kb;en-us;193888&Product=win2000
hth
--
Claudio Grazioli
http://www.grazioli.ch
.
- Follow-Ups:
- Re: Windows Service AutoStart Problem (C#)
- From: VinSand
- Re: Windows Service AutoStart Problem (C#)
- References:
- Windows Service AutoStart Problem (C#)
- From: VinSand
- Windows Service AutoStart Problem (C#)
- Prev by Date: Calculating Rows in a Datagrid to a textbox
- Next by Date: RE: Windows Service AutoStart Problem (C#)
- Previous by thread: Windows Service AutoStart Problem (C#)
- Next by thread: Re: Windows Service AutoStart Problem (C#)
- Index(es):
Relevant Pages
|
Loading