my windows service should save the name of the user, which logon/logoff at the moment. The following code works for me but didn\'t save the username:
protected o
You could try:
System.Security.Principal.WindowsIdentity.GetCurrent();
another option, see: Getting logged-on username from a service