467,088 Members | 1,308 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,088 developers. It's quick & easy.

.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?



Jul 21 '05 #1
  • viewed: 1169
1 Reply
Ok, so I figured it out. I did another search for Service1 in my
service class and I found this line;

Me.ServiceName = "Service1"

So I changed it to "Import Agent", rebuilt the service and started it.
That did the trick. I thought I had already combed through my code for
any reference to Service1 but apparently I missed one. Anyway, sorry
about the false alarm. Hopefully this post will come in handy for
someone else.

Jul 21 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Nathan Kovac | last post: by
10 posts views Thread by Ger | last post: by
reply views Thread by Charles Leonard | last post: by
1 post views Thread by jehugaleahsa@gmail.com | last post: by
5 posts views Thread by dm3281 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.