Re: Windows Service AutoStart Problem (C#)



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
.



Relevant Pages

  • Windows Service AutoStart Problem (C#)
    ... 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. ... Event Source: Service Control Manager ... Timeout waiting for the MyNewService service to connect. ...
    (microsoft.public.dotnet.framework.windowsforms)
  • Re: Development of event log message file
    ... registry info is because the Application entry in the registry for the ... EventLog Service does not have a key for an EventMessageFile. ... The original reason for the post was to ask if there was a better way for ... To read the event log on a remote computer, which is what it sounds like you ...
    (microsoft.public.vsnet.general)
  • RE: Setting category / event ID when tracing in VS2008
    ... To learn how to specify category for the event log entry, ... Now we can create an installer (you can choose to add the installer to your ... Public Class MyEventLogInstaller ... Now we can use the EventLog class in .NET Framework to write an event log ...
    (microsoft.public.dotnet.languages.vb)
  • RE: .NET 1.1 created event log has only "Not available" properties
    ... are several missing registry values for the .NET created event logs. ... I understanding you're using the EventLog class to ... write entries into custom eventlog in .net 1.1 application. ... // Write an informational entry to the event log. ...
    (microsoft.public.dotnet.framework)
  • Re: Security Exception with Enterprise Library Data Block
    ... >> trouble is I have no idea what the event log sink is ... >> anything with the event log. ... >> Jonathan Crawford ... >>> if your isp allows access to the eventlog, ...
    (microsoft.public.dotnet.framework.aspnet)

Loading