Υπάρχει κάποιος άλλος τρόπος εγγραφής στο event log των winVISTA, γιατί ο παράκάτω κώδικας παίζει μια χαρά σε winXP:
public void WriteMessageToEventLog(string theSource, string theMessage)
{
System.Diagnostics.EventLog evntLog = new System.Diagnostics.EventLog();
evntLog.Source = theSource; evntLog.WriteEntry(theMessage);
}
σε VISTA πάντα βγάζει SecurityException:
System.Security.SecurityException was unhandled Message="The source was not found, but some or all event logs could not be searched. Inaccessible logs: Security." Source="System"