PrincipalContext ctx = new PrincipalContext(ContextType.Domain); // This code runs as the application pool user // find currently logged in user UserPrincipal user = UserPrincipal.Current; if (user.Certificates != null) { strfirstname = user.UserPrincipalName; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)