I'm trying to retrieve some event log in a category that is different from Application. For example, I want to get the info in "Microsoft-Windows-Application Server-Applications/Operational". Below it is my code
EventLog log = new EventLog("Microsoft-Windows-Application Server-Applications/Operational");
int index = log.Entries.Count - 1;
Debug.WriteLine(log.Entries[index].Message);
But it always shows the error:
The event log 'Microsoft-Windows-Application Server-Applications/Operational' on computer '.' does not exist.
If I simply use "Application", then I can get the log in Application category.
How to get log for "Microsoft-Windows-Application Server-Applications/Operational"?
Thanks