Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- AppDomain.CurrentDomain.SetPrincipalPolicy(PrincipalPolicy.WindowsPrincipal);
- WindowsPrincipal principal = (WindowsPrincipal)Thread.CurrentPrincipal;
- WindowsIdentity identity = (WindowsIdentity)principal.Identity;
- String userName= principal.Identity.Name;
Add Comment
Please, Sign In to add comment