TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
priyanka
NA
7
0
Error while fetching EventLog entries
Oct 6 2009 1:12 PM
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
Reply
Answers (
6
)
How to change the default Icon of a win Form and including it in the .exe file?
multiple .cs files using shared method, using form name as a parameter