471,082 Members | 1,026 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,082 software developers and data experts.

"Requested registry access is not allowed" when reading event log

When attempting to read the System event log on a remote system, I receive a
"Requested registry access is not allowed" exception. I temporary added
myself as an administrator to the remote system and the code worked fine.
What permissions need to be assigned to my account on the remote system? If I
use the NT 4.0 resource kit utility "elogdmp.exe" i am able to dump event log
entries with my account.
Here is a segment of the code:
ev = new EventLog("System", DeviceName);
int LastLogToShow = ev.Entries.Count;

int totalCount = 0;
int i;
for ( i = ev.Entries.Count - 1; i>= 0 ; i--)
{
EventLogEntry CurrentEntry = ev.Entries[i];
if (CurrentEntry.TimeWritten >= calculatedDate )
{

Aug 30 '06 #1
0 1375

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by ag | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.