hello,

i've written an app to read information from a machines eventlog.
when i run this app on a machine it will read the eventlog on the specified remote machine (in the same domain).

However if i try and run the app so that it reads eventlog of a machine in a different domain it errors out.

There is trust between the two domains, for example i can ping by name or ip
from one domain to the other and vice versa so that is not the issue.

i guess the app needs to have permissions to access the eventlogs on the remote machines (in the different domain), i do know the administrator loging for the other domain, how do i do this programmatically?

below is a code snippet

Code:
            EventLog eLog = new EventLog("name", nameofbox, "WL");
            logMessage = eLog.Entries[eLog.Entries.Count - 1].Message;
            logDate = eLog.Entries[eLog.Entries.Count - 1].TimeGenerated.ToString();
            results.Add(nameofbox, logMessage + " : " + logDate);