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?

Signature
Carsten Thomsen
Enterprise Development with VS .NET, UML, and MSF
http://www.apress.com/book/bookDisplay.html?bID=105
>I am trying to monitor the System eventlog on a another machine using C#.
> However, when I instantiate an Eventlog with EventLog("System",
[quoted text clipped - 11 lines]
> Both machines, monitor and target, run W2000 Advanced Server with MSCS
> Any ideas?
Schmeusser - 24 Oct 2004 08:53 GMT
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.
> Do you have manual access to the remote event log from your machine using
> the credentials your application runs under?
[quoted text clipped - 14 lines]
> > Both machines, monitor and target, run W2000 Advanced Server with MSCS
> > Any ideas?