Question System.Diagnostics.EventLog.WriteEntry not working

JeffreyFlint

New member
Joined
Aug 14, 2008
Messages
3
Programming Experience
10+
My service has the command "System.Diagnostics.EventLog.WriteEntry" in several places as a means to debug the service. None of these commands are printing to the Application Event Viewer.

My problem is much worse than that though. The service fails to start because it fails to respond within the timeout time of 30 seconds. Because I don't have any means to see what is happening via these WriteEntry statements, I can't figure out the problem.

I am using VB2008 Express. My window service code is copied from the .NET documentation, as is my installer code. I've copied the code below.
 

Attachments

  • source.txt
    14 KB · Views: 31
I hate to side track your request and not answer it directly but are you sure you even want to use the event log?

I find it to be more flexible to keep an error log writing to a database table or a file that is put in a shared location.

Using the event log limits a technician to needing access to each computer to research any problems. Writing to a database of file could allow you to monitor problems from multiple users from a single location.
 
Back
Top