The attached is code is used to write an event to the event log, i.e. Application Log. However, it doesn't include the user name that was executed the command. The user name just says N/A. I can include this:
sEvent = "Sample Event " + WindowsIdentity.GetCurrent
in the message, but is there a way to have it included in the event log itself?
/// Summary description for Class1.
static void Main(string args)
sSource = "dotNET Sample App";
sLog = "Application";
sEvent = "Sample Event";