【发布时间】:2012-05-06 23:16:11
【问题描述】:
我似乎在清除 Active Directory 中的“altRecipient”属性时遇到了问题。当我运行我的程序时,它执行并成功返回,但是当我检查 ADUC 或 ADSI Edit 时,该属性没有被清除。以下是我尝试清除属性的方式:
termUser.Properties["altRecipient"].Clear();
我也尝试使用以下方法清除属性:
termUser.Properties["altRecipient"].Value = null;
如果我在“ipPhone”属性上使用 Clear() 方法,它会按预期工作。我在 ADSI Edit 中看到的“ipPhone”属性和“altRecipient”属性之间的唯一区别是“ipPhone”是 Unicode 字符串 语法,而“altRecipient”属性有一个 专有名称 语法。
任何帮助将不胜感激。谢谢你。
【问题讨论】:
-
您是否尝试将 DeliverAndRedirect 也设置为 false :
termUser.Properties["deliverAndRedirect"].Value = false;别忘了打电话给termUser.CommitChanges();
标签: c# active-directory directoryservices