[Mono-list] Does DirectoryEntry.Properties[].Remove() work?
Adam Tauno Williams
awilliam at whitemice.org
Wed Apr 29 11:26:36 EDT 2009
I've got a couple utilities I wrong in C#/Mono. I can add values to
attributes of an LDAP object..
user.Properties["mailLocalAddress"].Add(address);
user.CommitChanges();
.. which works well. But attempting to remove a value from an attribute
seems to be a no-op...
group.Properties["memberuid"].Remove(uid);
group.CommitChanges();
... as nothing seems to happen. The value does disappear from the
*local* copy of the LDAP object but no modification request is sent to
the server [verified with Wireshark]. For example...
Console.WriteLine(" {0} members.", g.Properties["memberuid"].Count);
foreach(string uid in drops)
g.Properties["memberuid"].Remove(uid);
g.CommitChanges();
Console.WriteLine(" {0} members.", g.Properties["memberuid"].Count);
... says...
Verifying group sales
57 members.
31 members.
... but the contents of the DSA are unchanged.
--
OpenGroupware developer: awilliam at whitemice.org
<http://whitemiceconsulting.blogspot.com/>
OpenGroupare & Cyrus IMAPd documenation @
<http://docs.opengroupware.org/Members/whitemice/wmogag/file_view>
More information about the Mono-list
mailing list