ldap DirectoryServices.DirectoryEntry System.NotImplementedException: Handling of this ADSVALUE type

M

m96

hi,

i'm trying to make a query to a ldap server (version v2 or v3 doen't
matter) with c#. the query works just fine but the problem is that i can't
read the custom attributes/fields, since .net gives the following error:

System.NotImplementedException: Handling of this ADSVALUE type is not yet
implemented (type = 0xb).

after googling for a long time i found out that many other have the same
problem like me but nobody has a solution for this.

i would even be happy if i would be able to figure out how to implement
handlers for custom fields, so at least i can see them...

i would really appreciate any, really any help on this topic...

thank you in advance...
 
L

Lionel LASKE

My guess is that your LDAP Server is in LDAP v2 (MMS ?).
When you call a LDAP v2 Server with ADSI or with DirectoryServices, you
can't use custom attribute.
The reason is that ADSI/Directory Services need the schema to expose
attributes as object properties. Unfortunatly, LDAP schema is only published
in LDAP v3. So, when ADSI find a custom attribute, it can't determine its
type and raise an exception.

On a LDAP v2 server you must use only standard LDAP attribute with
ADSI/Directory Services . If you really need using custom attributes, you
must call the native C/LDAP API (and it's not fun !).

Lionel.
 
M

m96

hi,
My guess is that your LDAP Server is in LDAP v2 (MMS ?).

the problem also occurs on ldap v3 servers like the free novell ldap
server at www.nldap.com port 80 for informations and port 389 for the ldap
server. you can also create an account for authorized access. and even
then it won't work....

for example this is what i get from the server above for a search
(cn=admin):

objectclass := inetOrgPerson
objectclass := organizationalPerson
objectclass := person
objectclass := top
objectclass := ndsLoginProperties
passwordrequired := False
messageserver := cn=DEVNET-PUBLIC_SYS,o=NOVELL
logintime := 2/4/2005 2:13:37 AM
networkaddress := System.NotImplementedException: Handling of this ADSVALUE type is not yet implemented (type = 0xb).
nrdregistryindex := System.Byte[]
language := System.NotImplementedException: Handling of this ADSVALUE type is not yet implemented (type = 0xb).
passwordallowchange := True
adspath := LDAP://www.nldap.com:389/cn=admin,o=NOVELL
equivalenttome := cn=bfjeldst,o=NOVELL
equivalenttome := cn=jcox,o=NOVELL
equivalenttome := cn=cseamons,o=NOVELL
equivalenttome := cn=AClark,o=NOVELL
equivalenttome := cn=FZhao,o=NOVELL
sn := admin
cn := admin
acl := System.NotImplementedException: Handling of this ADSVALUE type is not yet implemented (type = 0xb).
acl := System.NotImplementedException: Handling of this ADSVALUE type is not yet implemented (type = 0xb).
acl := System.NotImplementedException: Handling of this ADSVALUE type is not yet implemented (type = 0xb).
acl := System.NotImplementedException: Handling of this ADSVALUE type is not yet implemented (type = 0xb).
nrdregistrydata := System.Byte[]
When you call a LDAP v2 Server with ADSI or with DirectoryServices, you
can't use custom attribute.
The reason is that ADSI/Directory Services need the schema to expose
attributes as object properties. Unfortunatly, LDAP schema is only published
in LDAP v3. So, when ADSI find a custom attribute, it can't determine its
type and raise an exception.

On a LDAP v2 server you must use only standard LDAP attribute with
ADSI/Directory Services . If you really need using custom attributes, you
must call the native C/LDAP API (and it's not fun !).

so that means you can not add handler for user specific types... that's a
shame...

thank you very much for your help...
 
W

Willy Denoyette [MVP]

m96 said:
hi,
My guess is that your LDAP Server is in LDAP v2 (MMS ?).

the problem also occurs on ldap v3 servers like the free novell ldap
server at www.nldap.com port 80 for informations and port 389 for the ldap
server. you can also create an account for authorized access. and even
then it won't work....

for example this is what i get from the server above for a search
(cn=admin):

objectclass := inetOrgPerson
objectclass := organizationalPerson
objectclass := person
objectclass := top
objectclass := ndsLoginProperties
passwordrequired := False
messageserver := cn=DEVNET-PUBLIC_SYS,o=NOVELL
logintime := 2/4/2005 2:13:37 AM
networkaddress := System.NotImplementedException: Handling of this
ADSVALUE type is not yet implemented (type = 0xb).
nrdregistryindex := System.Byte[]
language := System.NotImplementedException: Handling of this ADSVALUE type
is not yet implemented (type = 0xb).
passwordallowchange := True
adspath := LDAP://www.nldap.com:389/cn=admin,o=NOVELL
equivalenttome := cn=bfjeldst,o=NOVELL
equivalenttome := cn=jcox,o=NOVELL
equivalenttome := cn=cseamons,o=NOVELL
equivalenttome := cn=AClark,o=NOVELL
equivalenttome := cn=FZhao,o=NOVELL
sn := admin
cn := admin
acl := System.NotImplementedException: Handling of this ADSVALUE type is
not yet implemented (type = 0xb).
acl := System.NotImplementedException: Handling of this ADSVALUE type is
not yet implemented (type = 0xb).
acl := System.NotImplementedException: Handling of this ADSVALUE type is
not yet implemented (type = 0xb).
acl := System.NotImplementedException: Handling of this ADSVALUE type is
not yet implemented (type = 0xb).
nrdregistrydata := System.Byte[]
When you call a LDAP v2 Server with ADSI or with DirectoryServices, you
can't use custom attribute.
The reason is that ADSI/Directory Services need the schema to expose
attributes as object properties. Unfortunatly, LDAP schema is only
published
in LDAP v3. So, when ADSI find a custom attribute, it can't determine its
type and raise an exception.

On a LDAP v2 server you must use only standard LDAP attribute with
ADSI/Directory Services . If you really need using custom attributes, you
must call the native C/LDAP API (and it's not fun !).

so that means you can not add handler for user specific types... that's a
shame...

thank you very much for your help...

Note that acl is not a property of the inetOrgPerson in the Active Directory
schema. Didn't you try using the NDS ADSI provider instead of the LDAP
provider?

Willy.
 
D

Dino Chiesa [Microsoft]

If you don't like System.DirectoryServices, you can get third-party LDAP
libs for C#.
eg
http://forge.novell.com/modules/xfmod/project/?ldapcsharp

(updated last week)

-Dino



Willy Denoyette said:
m96 said:
hi,
My guess is that your LDAP Server is in LDAP v2 (MMS ?).

the problem also occurs on ldap v3 servers like the free novell ldap
server at www.nldap.com port 80 for informations and port 389 for the
ldap
server. you can also create an account for authorized access. and even
then it won't work....

for example this is what i get from the server above for a search
(cn=admin):

objectclass := inetOrgPerson
objectclass := organizationalPerson
objectclass := person
objectclass := top
objectclass := ndsLoginProperties
passwordrequired := False
messageserver := cn=DEVNET-PUBLIC_SYS,o=NOVELL
logintime := 2/4/2005 2:13:37 AM
networkaddress := System.NotImplementedException: Handling of this
ADSVALUE type is not yet implemented (type = 0xb).
nrdregistryindex := System.Byte[]
language := System.NotImplementedException: Handling of this ADSVALUE
type is not yet implemented (type = 0xb).
passwordallowchange := True
adspath := LDAP://www.nldap.com:389/cn=admin,o=NOVELL
equivalenttome := cn=bfjeldst,o=NOVELL
equivalenttome := cn=jcox,o=NOVELL
equivalenttome := cn=cseamons,o=NOVELL
equivalenttome := cn=AClark,o=NOVELL
equivalenttome := cn=FZhao,o=NOVELL
sn := admin
cn := admin
acl := System.NotImplementedException: Handling of this ADSVALUE type is
not yet implemented (type = 0xb).
acl := System.NotImplementedException: Handling of this ADSVALUE type is
not yet implemented (type = 0xb).
acl := System.NotImplementedException: Handling of this ADSVALUE type is
not yet implemented (type = 0xb).
acl := System.NotImplementedException: Handling of this ADSVALUE type is
not yet implemented (type = 0xb).
nrdregistrydata := System.Byte[]
When you call a LDAP v2 Server with ADSI or with DirectoryServices, you
can't use custom attribute.
The reason is that ADSI/Directory Services need the schema to expose
attributes as object properties. Unfortunatly, LDAP schema is only
published
in LDAP v3. So, when ADSI find a custom attribute, it can't determine
its
type and raise an exception.

On a LDAP v2 server you must use only standard LDAP attribute with
ADSI/Directory Services . If you really need using custom attributes,
you
must call the native C/LDAP API (and it's not fun !).

so that means you can not add handler for user specific types... that's a
shame...

thank you very much for your help...

Note that acl is not a property of the inetOrgPerson in the Active
Directory schema. Didn't you try using the NDS ADSI provider instead of
the LDAP provider?

Willy.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top