C# EventLogSession Local Admin

matitdob

New member
Joined
Apr 8, 2021
Messages
1
Programming Experience
Beginner
I have a problem how to use the code below for the admin of the local remote computer. Typing ".", "" Or "computer name" as domain doesn't help. The omission results in a syntax error.

C#:
EventLogSession session = new EventLogSession(
"ComputerName",            // Remote Computer
"Domain",            //Domain
"Admin",               // Username
pw,
SessionAuthentication.Default);
 

JohnH

C# Forum Moderator
Staff member
Joined
Apr 23, 2011
Messages
1,170
Location
Norway
Programming Experience
10+
null is default value, if server is null it will use "localhost".
 
Top Bottom