Hi All,
I have created a tool in c#, which is monitors the eventlog ( security log) and fetches the details of every new entry.
The tool runs fine on one of the machines, but on another machine it runs well for some time and then starts giving this error:
"The description for Event ID '0' in Source '' cannot be found.
The local computer may not have the necessary registry information or message DLL files to display the message, or you may not have permission to access them. The following information is part of the event: "
The code to fetch the details is as follows:
if (eventLog == null)
{
eventLog = new EventLog("Security");
eventLog.EntryWritten += new EntryWrittenEventHandler(EntryToLog);
}
eventLog.EnableRaisingEvents = true;
...
...
private void EntryToLog(Object source, System.Diagnostics.EntryWrittenEventArgs e)
{
< captures various details of e and proccessed them accordingly
}
I am not able to figure out if the problem is with the tool, the framework or with the machine's event log.
Any kind of help will be highly appreciated
Thanks,
Priyanka
Loading
Roei BarPosted Oct 6, 2009, 3:33 PM
priyankaPosted Oct 8, 2009, 9:02 AM
Roman StefanovPosted Oct 8, 2009, 7:10 AM
priyankaPosted Oct 6, 2009, 3:53 PM
Will have a look at it and try to figure out if such a scenario is taking place
priyankaPosted Oct 6, 2009, 3:01 PM
I too feel that it is due to a permission problem; but why is it that initially the tool runs for some time capturing the details of the eventlog and then after some time it is denied of access? It should have failed in the very beginning and thats what I am not able to understand.
Thanks,
Priyanka
Roei BarPosted Oct 6, 2009, 2:45 PM