|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
writing to Vista's windows application logDim ev As New EventLog("Application", System.Environment.MachineName, "MyProgramName") Dim LogText As String = "Hello world" Dim EntryType As System.Diagnostics.EventLogEntryType = EventLogEntryType.Information ev.WriteEntry(LogText, EntryType, LogEventID) ev.Close() The following excpetion is thrown on Vista: System.Security.SecurityException: The source was not found, but some or all event logs could not be searched. Inaccessible logs: Security. at System.Diagnostics.EventLog.FindSourceRegistration(String source, String machineName, Boolean readOnly) at System.Diagnostics.EventLog.SourceExists(String source, String machineName) at System.Diagnostics.EventLog.VerifyAndCreateSource(String sourceName, String currentMachineName) at System.Diagnostics.EventLog.WriteEntry(String message, EventLogEntryType type, Int32 eventID, Int16 category, Byte[] rawData) at System.Diagnostics.EventLog.WriteEntry(String message, EventLogEntryType type, Int32 eventID) Any ideas on what I am missing for Vista? Thanks in advance, Rob |
|||||||||||||||||||||||