Event log query... very odd!
-
Hi All, i have a code (below), it take 2 variables, the first being the server name and the second being the eventID to look for in the Directory Service eventlog. it seems to work fine for all eventID's except the one im looking for - 1394, where it always shows nothing!! any ideas? EventLog el = new EventLog("Directory Service", args[0].ToString()); foreach(EventLogEntry i in el.Entries) { if(Convert.ToInt32(i.EventID) == Convert.ToInt32(args[1])) { Console.WriteLine(i.EventID.ToString() + " - " + i.TimeWritten.ToShortDateString()); } }
-
Hi All, i have a code (below), it take 2 variables, the first being the server name and the second being the eventID to look for in the Directory Service eventlog. it seems to work fine for all eventID's except the one im looking for - 1394, where it always shows nothing!! any ideas? EventLog el = new EventLog("Directory Service", args[0].ToString()); foreach(EventLogEntry i in el.Entries) { if(Convert.ToInt32(i.EventID) == Convert.ToInt32(args[1])) { Console.WriteLine(i.EventID.ToString() + " - " + i.TimeWritten.ToShortDateString()); } }
lane0p2 wrote:
it seems to work fine for all eventID's except the one im looking for - 1394, where it always shows nothing!!
Probably, there is no event for this id :^)
Manas Bhardwaj Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
-
lane0p2 wrote:
it seems to work fine for all eventID's except the one im looking for - 1394, where it always shows nothing!!
Probably, there is no event for this id :^)
Manas Bhardwaj Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.