Are you sure you aren't accidentally trying to create a proxy for a SID that
already exists in ADAM?
Note that you probably will have better results using DirSync rather than
usnChanged polling or perhaps just using ADAMSync directly instead of
writing your own thing here. That might not work if there is something
special about your application where you can't do that, but usually those
approaches work better.
Joe Kaplan-MS MVP Directory Services Programming
Co-author of "The .NET Developer's Guide to Directory Services Programming"
I've written script using vb.net that will read objects from AD, and
sync them with my ADAM instance. I'm using the polling mechanism and
pointing always to the same DC, by checking usncreated against
hightestUSN on that DC I will add user/group/wks objects.
This is working fine, however I run into issue with creation some
users (all users are created as class userproxy)
I get following error message:
If I create the same user as class "user" it works. I've tried to
remove all additional attributes and only have dn, ObjectSID still get
The error occurs when I'm trying to do "commit.changes"
snippet from code:
Dim dom As New DirectoryEntry("LDAP://" & strADAM,
Dim user As DirectoryEntry = dom.Children.Add("CN=" &
'user.Properties("co").Value = strCountry.ToString
' Commit the new user to the directory.
user.CommitChanges() „» When doing this
call the error occurs.
I've managed to create around 100,000 user objects, 100+ groups and
30,000 workstation objects. The error seems to occur for 10-20 users
(always the same users). If I compare these users against other users
I cannot see any differences.
Any ideas suggestions are appreciated