Re: Setting Empty Property Values in ADAM
- From: "Joe Kaplan" <joseph.e.kaplan@xxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 13 Sep 2006 12:04:31 -0500
Good deal. Best of luck with your efforts going forward. I hope some of
the stuff in our book might be useful to you as well (should you happen to
grab it). You can check out some of the free stuff at the link below.
Joe K.
--
Joe Kaplan-MS MVP Directory Services Programming
Co-author of "The .NET Developer's Guide to Directory Services Programming"
http://www.directoryprogramming.net
--
"Indigenous" <Indigenous@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:4DB311F9-D326-4959-963B-46EFCA7D3394@xxxxxxxxxxxxxxxx
Joe
Please ignore my previous response, I've found the problem. It isn't
setting
the properties it's clearing it (.Clear).
I've done a workaround that doesn't bother clearing it if it doesn't
exist.
"Indigenous" wrote:
Thanks Joe
I tried calling both flavours of refreshCache (one with no parametwe and
one
with an array contining the name of the property i want to set). It
didn't
raise any exceptions. What would you expect to see?
The ADAM schema was a copy of AD, user objects are replicated nightly
from
AD to ADAM. The fields I am trying to set is "o" - a standard field. If
the
replicated user already had a value for "o " in AD, I cna set it in ADAM,
otherwise, I can't.
Trev
"Joe Kaplan" wrote:
It is possible that with AD, ADSI is using the permissive modify
control and
isn't using it with ADAM, but it seems more likely that you might be
trying
to use an attribute that doesn't exist for the current objectClass.
You can discover if the latter issue is the problem by getting the
allowedAttributes attribute (via RefreshCache, since it is a
constructed
attribute and must be requested specifically) and seeing if the
attribute
you are trying to set is in that list. If it isn't, then the schema is
the
problem.
Joe K.
--
Joe Kaplan-MS MVP Directory Services Programming
Co-author of "The .NET Developer's Guide to Directory Services
Programming"
http://www.directoryprogramming.net
--
"Indigenous" <Indigenous@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:6719F348-FEB3-4FC0-B356-120689976350@xxxxxxxxxxxxxxxx
Hi
When I use .NET Framework 1.1 (DirectoryServices) to set an AD
Property
Value, all is well even if the property doesn't yet have a value.
However, if i do the same call against ADAM I get the exception "The
specified directory service attribute or value does not exist." when
I
call
commitChanges.
Despite the fact that the property is not in the property array as it
has
no
current value, AD seems to magically handle it and add it. ADAM
doesn't.
Can anyone help, i've included my code for clarity.
objDE.Properties(v_strPropName).Value = strPropValue
objDE.CommitChanges()
.
- References:
- Re: Setting Empty Property Values in ADAM
- From: Joe Kaplan
- Re: Setting Empty Property Values in ADAM
- From: Indigenous
- Re: Setting Empty Property Values in ADAM
- Prev by Date: Re: Setting Password via LDAP/LDIF
- Next by Date: Re: How Can I to add a attribute in Active Directory
- Previous by thread: Re: Setting Empty Property Values in ADAM
- Next by thread: RE: display hidden field in ADUC
- Index(es):
Relevant Pages
|