I Irfan Aug 6, 2004 #3 Hi, you could use the following code for the same. System.Security.Principal.WindowsPrincipal wp = new System.Security.Principal.WindowsPrincipal (System.Security.Principal.WindowsIdentity.GetCurrent()); MessageBox.Show(wp.Identity.Name); Here the messagebox displays the domain name alongwith the user logged in(the UseriD). Using the ID, you could validate the user. HTH irfan
Hi, you could use the following code for the same. System.Security.Principal.WindowsPrincipal wp = new System.Security.Principal.WindowsPrincipal (System.Security.Principal.WindowsIdentity.GetCurrent()); MessageBox.Show(wp.Identity.Name); Here the messagebox displays the domain name alongwith the user logged in(the UseriD). Using the ID, you could validate the user. HTH irfan