簡體   English   中英

如何通過ASP.NET MVC在LDAP中設置用戶UserPrincipleName?

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

這是我嘗試過的:

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

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

user.UserPrincipalName = Username;

不會發生任何錯誤,但不會在LDAP中進行更改。

使用Save()方法。

User.Save()

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM