I'm trying to read a stored .evtx with the EventLog Class from System.Diagnostics. but it doesn't work.
Isn't it possible to read a stored evtx file with EventLog Class or where is the problem?
Below is My Code
string source = @"S:\test.evtx";
EventLog eventLog = new EventLog();
eventLog.Source = source;
foreach (EventLogEntry log in eventLog.Entries)
{
Console.WriteLine("{0}\n", log.Message);
}