G
Guest
Hi...
In my service I need to determine the user that is Logged on.
I'm using
WindowsPrincipal wp = new WindowsPrincipal(WindowsIdentity.GetCurrent())
string name=wp.Identity.Name
but it returns NT ACCOUNT\SYSTEM instead of the actual user name.
I know why its doing this just don't know how to stop it from doing this
does anyone know a way to get the username.
In my service I need to determine the user that is Logged on.
I'm using
WindowsPrincipal wp = new WindowsPrincipal(WindowsIdentity.GetCurrent())
string name=wp.Identity.Name
but it returns NT ACCOUNT\SYSTEM instead of the actual user name.
I know why its doing this just don't know how to stop it from doing this
does anyone know a way to get the username.