简体   繁体   中英

How do I set a users UserPrincipleName in LDAP through ASP.NET MVC?

Here is what I've tried:

PrincipalContext context = new PrincipalContext(ContextType.ApplicationDirectory, "dev", "cn=" + SupplierName + ",cn=suppliers,o=dd");

UserPrincipal user = UserPrincipal.FindByIdentity(context, Username);

user.UserPrincipalName = Username;

No errors occur, but the changes are not made in LDAP.

使用Save()方法。

User.Save()

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM