Hi, I'm trying to write to the event log in a Windows Service Application I'm developing.
The Service builds OK. But the service just stops as soon as it starts without any logging.
If Not System.Diagnostics.EventLog.SourceExists("MyService") Then
System.Diagnostics.EventLog.CreateEventSource("NyService", "MyService Log")
_eventLog = New EventLog()
_eventLog.Source = "MyService"
_eventLog.WriteEntry(" Service started.", EventLogEntryType.Information)