Results 1 to 2 of 2

Thread: read eventlog remote machine

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 2002
    Location
    Norwich, UK
    Posts
    405

    read eventlog remote machine

    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);

  2. #2

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 2002
    Location
    Norwich, UK
    Posts
    405

    Re: read eventlog remote machine

    well i've found a workaround in that if i do shift + rightclick, and run as
    the app as the other domains administrator, then the app works fine.

    Is it in .net possible for the app to programmatically run as the domain admin?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width