I'm trying to build a feature to my .Net application to be able to talk to an LDAP server to read user attributes and authenticate users. I have setup a test directory server using OpenDS, added custom attributes and objects, and added users with the new object types. Everything works fine until I attempt to read the custom attribute values, I get :
{"Unknown error (0x8000500c)"}
at System.DirectoryServices.PropertyValueCollection.PopulateList()
at System.DirectoryServices.PropertyValueCollection..ctor(DirectoryEntry entry, String propertyName)
at System.DirectoryServices.PropertyCollection.get_Item(String propertyName)
I have tried suggestions from this postthis post (using properly formed oids) as well as this postthis post (using fully qualified domain name in your ldap path - i am using something like LDAP://mymachine.company.local/... ). Others have suggested that since the COM error code means E_ADS_CANT_CONVERT_DATATYPE there is something wrong with my attributes or schema, but the attributes are setup as DirectoryString, which there are other default fields of the same type that I can read.
I understand working with OpenDS will not work the same as Active Directory, I have a separate module for AD that is working fine, I'm just wondering if anyone has had experience with talking to OpenDS or Sun One LDAP implementations.
Thoughts? I can't find much on google dealing with OpenDS and .NET together which makes me think I should be doing something else. As I said the AD stuff works fine however I'd really like to be able to do this with OpenDS as well.
Thanks!
Rusty