Sunday, September 28, 2014

TimeGenerated returns wrong value '01/01/1970 00:00:00' when querying the security event log using C#

Hi Yoni.h,


I can't reproduce your problem, I subscribe the EntryWritten event in my sample application, but I get the correct TimeGenerated and TimeWritten everytime.


Maybe there's some unknow bug in the EventLog component in the .NET Framework, but I'm not sure. I recomment that you use another way to query the event log periodically with WMI. You could check the sample code here for how to query event log with the help of WMI:


[CCS LABS] WMI: Reading the Event Log




We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.

Click HERE to participate the survey.


No comments:

Post a Comment