By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,574 Members | 3,021 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,574 IT Pros & Developers. It's quick & easy.

.Net Windows Service Issue

P: n/a
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
Share this Question
Share on Google+
1 Reply

P: n/a
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.