Click here to Skip to main content
15,891,951 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello,

Perhaps someone could help me. I have the following code which works fine when using Active directory as LDAP:
C#
DirectorySearcher searcher = new DirectorySearcher(new DirectoryEntry(path, user, password, type));

searcher.Filter = "(&(objectclass=person)(name=" + name + "))";
SearchResult result = searcher.FindOne();

if (result != null) {
  DirectoryEntry user = new DirectoryEntry(result.Path, user, password);
  var properties = user.Properties["memberOf"];
} 

When trying to query a domino LDAP the line:
var properties = user.Properties["memberOf"];

causes the following exception: System.DirectoryServices.DirectoryServicesCOMException (0x80072021): A protocol error occurred.

So my question is, can I handle a domino server with DirectoryEntry and DirectorySearcher? If yes, how?
Is there an alternative to query users from a domino server LDAP?

Thank you!
Matt
Posted
Updated 20-Oct-10 5:09am
v2
Comments
Dylan Morley 20-Oct-10 11:24am    
So it's only at the following line that an error occurs?

var properties = user.Properties["memberOf"];

So at this point, you have valid SearchResult objects (result) and DirectoryEntry object(user) ?

Maybe the domino server doesn't support the memberOf syntax, but has an equivalent?

1 solution

Possibly have a look here

http://www-01.ibm.com/support/docview.wss?rs=463&context=SSKTMJ&dc=DB520&dc=DB560&uid=swg21270777&loc=en_US&cs=UTF-8&lang=en&rss=ct463lotu[^]

The dominoAccessGroups attribute must be requested specifically from an authenticated user, except when it is added to the "Anonymous Users can query" setting. This dominoAccessGroups attribute provides all groups, including those found through nested group expansion. A single search produces a full group list.

This feature is unavailable in previous releases of Domino. Although similar to Windows 2003 Active Directory's MemberOf  attribute, this new dominoAccessGroups attribute also includes nested groups:
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900