Active directory 如何在Active Directory中清除或更新缩略图照片?

Active directory 如何在Active Directory中清除或更新缩略图照片?,active-directory,Active Directory,我可以用下面的代码将图片添加到广告中 entryToUpdate.Properties["thumbnailPhoto"].Add(binaryData); entryToUpdate.CommitChanges(); 但是当我尝试更新时,我得到一个错误(指定的目录服务属性或值已经存在)。我正在清理图片,但它似乎确实有效 entryToUpdate.Properties["thumbnailPhoto"].Clear(); 我让它工作了。每次我都必须提交更改 entryToUpdate.Pr

我可以用下面的代码将图片添加到广告中

entryToUpdate.Properties["thumbnailPhoto"].Add(binaryData);
entryToUpdate.CommitChanges();
但是当我尝试更新时,我得到一个错误(指定的目录服务属性或值已经存在)。我正在清理图片,但它似乎确实有效

entryToUpdate.Properties["thumbnailPhoto"].Clear();

我让它工作了。每次我都必须提交更改

entryToUpdate.Properties["thumbnailPhoto"].Clear();
entryToUpdate.CommitChanges();

entryToUpdate.Properties["thumbnailPhoto"].Add(binaryData);
entryToUpdate.CommitChanges();

我让它工作了。每次我都必须提交更改

entryToUpdate.Properties["thumbnailPhoto"].Clear();
entryToUpdate.CommitChanges();

entryToUpdate.Properties["thumbnailPhoto"].Add(binaryData);
entryToUpdate.CommitChanges();