📅  最后修改于: 2022-03-11 14:49:09.541000             🧑  作者: Mango
PrincipalContext ctx = new PrincipalContext(contextType, domainname, username,password);
UserPrincipal user = UserPrincipal.FindByIdentity(ctx, userName);