Cannot write to remote Eventlog

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to monitor the System eventlog on a another machine using C#.
However, when I instantiate an Eventlog with EventLog("System",
"machinename"), I get an exception with the message "Cannot monitor Event
log. The log may exist on a remote computer".
My code works fine when I use the local machine name, but not if I use a
remote machine.
I already tried the following:
- fully qualified DNS name
- IP address
- same user account with administrator rights on the target machine as on
client
- case sensitive names

Both machines, monitor and target, run W2000 Advanced Server with MSCS
Any ideas?
 
Do you have manual access to the remote event log from your machine using
the credentials your application runs under?
 
Yes, I can open the eventlog in the mmc console window. The application is a
windows application that shall monitor remote eventlogs. To test it, I run it
from a cmd shell.
In the meantime I discovered a new effect that totally confounds me: I
create 2 instances of Eventlog, one lon the ocal machine and one remote. What
happens depends on the order I am doing this: when I first open the local one
and then the remote one, no exception occurs.
But when I reverse the order (first the remote one and then the local one),
I always get an exception.
 
Back
Top