468,545 Members | 1,702 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,545 developers. It's quick & easy.

"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 1299

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by ag | last post: by
1 post views Thread by UniDue | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.