.Net Windows Service Issue



I have created a windows service in VB.Net called 'Import Agent'. In
the event log, when the service starts, the source is listed as
Service1. Everywhere else that matters, like the MMC, my project and
solution names, and the name of my service class all have the correct
name. I changed the startup object in my project's properties from
Service1 to ImportAgent. I even went through the registry and changed
every reference from Service1 to Import Agent that may have been
related to my service. I reinstalled the service several times and
rebooted my dev machine but no luck.

I am not directly writing to the Event Log, I believe the Winddows
Service Manager does it automatically. When my service does write to
the event log, I am able to set the source name programaticaly, so no
problems their. However I cannot for the life of me figure out how to
get windows to write the name of my service as the source, and not
Service1 on startup. Any ideas?

TIA

Tyson

.



Relevant Pages

  • Re: Error tracking a windows service
    ... Catch block I log any exceptions to the Event Log ... | arguement to tell it to do something special like capture ... | when certain command line arguements are passed in, the compiled code ... | that with a windows service? ...
    (microsoft.public.dotnet.languages.vb)
  • Re: SQL Agent Failure - monitoring
    ... > unexpectedly or fails to start. ... >> I want to log to the Windows Event Log whenever the SQL Server Agent is ... >> I have set the agent to AutoStart when the OpSys restarts, ...
    (microsoft.public.sqlserver.server)
  • intermittent net 2.0 runtime error, faulting module kernel32.dll
    ... windows service that is installed on a server. ... business logic that runs 24x7 is within a try/catch statement. ... the system event log shows the windows service unexpectedly stopping within ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Windows service making duplicate event log entries.
    ... > No one has any profound thoughts? ... >> I've created a windows service that occasionally writes information into ... >> an event log. ... >> Public Shared Function WriteToEventLog(ByVal Entry As String, ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Should a window service use its own evenl log?
    ... when a windows service starts or stops it is automatically logged to the ... Ollie Riches ... i am thinking to log to the event log only "Service X ... >> I think that it entirely depends on what you are logging. ...
    (microsoft.public.dotnet.languages.csharp)