Hi
AppDomain myDomain = Thread.GetDomain();
myDomain.SetPrincipalPolicy(PrincipalPolicy.Window sPrincipal);
WindowsPrincipal mWinPrin mWinPrin =
(WindowsPrincipal)Thread.CurrentPrincipal ;
This also allows you to check if the user belongs to certain groups etc,
Henk
"Sylvain Larin" <slarin@NOSPAM_gmail.com> wrote in message
news:Oq***************@TK2MSFTNGP09.phx.gbl...
I want to give the access right to my application based on who is currently
logued in Windows. How can I get the current username from Windows?
TIA