LDAP C#, problem to get an attribute of "accessGroup" objectClass

E

Etienne

hi,

I wrote an API in C# in the aim to give to business applications
functionnalities as authentication or data extraction.
All of the funtionnalities work fine but I'm not able to get an
extract attribute. I defined a specified class for profile entries and
these entries have "accessGroup" objectclass. I can get all of the
attributes (multi-valued or single) of my entries except "member"
which is a required multi-valued attribute of "accessGroup". I can get
this attribute with a Java API so I don't understand why it's not
possible in C#.
I use Security Server LDAP which is an extension of RACF on zOS 1.4.

the error :
"System.NullReferenceException"
message "Object reference not set to an instance of an object".
HRESULT "-2147467261".

thanks in advance for your help.
Etienne


DirectoryEntry rootEntry = new DirectoryEntry(
"LDAP://X.X.X.X:389/o=root",
"uid=XXXXXX, ou=people, o=root",
"password",
AuthenticationTypes.ServerBind);

DirectorySearcher deSearch = new DirectorySearcher(rootEntry);
deSearch.Filter = "(&(member
=uid=XXXXXX,ou=people,o=root)(description=profileB))";
deSearch.PropertiesToLoad.Add("member");
deSearch.PropertiesToLoad.Add("cn");
deSearch.SearchScope = SearchScope.Subtree;

SearchResult result= deSearch.FindOne();
if(result !=null)
{
Console.WriteLine(result.Properties["cn"][0]);
foreach (String member in result.Properties["member"])
{
Console.WriteLine(member);
}
}
 

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