I have been having a problem with my services working correctly.
I am trying to create a custom event log, that the system refuses to create. IT may have been connected to my problem of creating and delete the windows service.
I had actually created 2 that were both different names, but the service name was both service1. I then changed the second one to service2, but it refused to uninstall and would delete the Log file. I finally got most of it deleted using the registry and now I can create and delete Service, but there is still a LEGACY_Service2, that points to my file, that is out there that I can't delete and even when uninstalled, it is still there
I have some code:
If Not MyLog.SourceExists("FTSEmailDispatcher") Then
MyLog.CreateEventSource("FTSEmailDispatcher", "FTSEmailDispatcher Log")
'Create Log ElseMyLog.CreateEventSource("FTSEmailDispatcher", "FTSEmailDispatcher Log")
'Create Log End IfThat should create the log file no matter what, but won't do it. Is there some message somewhere I can look at to see why it won't
Thanks,
Tom

Service will not create Log file
Borook
vitaliyk
Tom, I'm a little unclear whether the trouble is that the service isn't running or that the event log isn't being created. If you run your code to create the custom event log from a command line app (not in a service) does it work Or is the problem that the log would be created, but the service isn't running properly
For the record, I ran the following code in a console app and the log was successfully created:
EventLog.CreateEventSource("FTSEmailDispatcher", "FTSEmailDispatcher Log")
Thanks,
Mike