11 Mar 2009
On Windows. a process always run using some credentials. The following method should work with Windows applications as well as the XBAP.
1: var x = WindowsIdentity.GetCurrent();
2: x.Name gives you the current user.