Windows Eventlog on a remote computer
I want to access the eventlog on a remote computer in WinForms using C#. I am using the Server Explorer at design time to connect to a remote computer and able to access the eventlog of the computer.
I want to do the same programmatically. i.e., I should be able to connect to remote computer programmatically by supplying user credentials at run time and then I have to access the event log from that computer. Is there any possibility to do that in C#. Please help me in this regard. Its very urgent for me.
Thanks,
Suresh
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

cechode10 reputationPosted Nov 21, 2005, 6:39 PM EST
this does not work?
System.Diagnostics.EventLog ev = new System.Diagnostics.EventLog( "System", "MyMachineNAME" );
Console.Write(ev.Entries[0].Message);
suresh kumar 03 reputationPosted Nov 22, 2005, 4:41 AM EST