Note that there are some explanatory texts on larger screens.

plurals
  1. POIQueryable to non-AD LDAP
    primarykey
    data
    text
    <p>Our institution has a large LDAP system which we access over LDAPS on port 636. I'm attempting to create an IQueryable interface to this LDAP which maps onto existing People entities but am having trouble.</p> <p>I mention the above so folks know my end goal but I'd be satisified today if someone could help me simply run a successful query against this non-AD LDAP, even if its outside of the IQueryable realm. Here's what I have so far (I've edited the password, uid and ou for security):</p> <pre><code>var url = @"ldaps://ldap.ucdavis.edu:636/uid=s1,ou=s2,dc=ucdavis,dc=edu"; var password = @"something"; DirectoryEntry entry = new DirectoryEntry(url); entry.Password = password; entry.AuthenticationType = AuthenticationTypes.Secure; DirectorySearcher mySearcher = new DirectorySearcher(entry); SearchResultCollection results; results = mySearcher.FindAll(); foreach(SearchResult resEnt in results) { ResultPropertyCollection propcoll = resEnt.Properties; foreach (string key in propcoll.PropertyNames) { foreach (object values in propcoll[key]) { switch (key) { case "sn": //sb.Append(key.ToString() + "&lt;surname&gt;" //+ values.ToString() + "&lt;/surname&gt;"); break; case "cn": //sb.Append(key.ToString() + "&lt;cn&gt;" //+ values.ToString() + "&lt;/cn&gt;"); break; case "name": //sb.Append(key.ToString() + "&lt;name&gt;" //+ values.ToString() + "&lt;/name&gt;"); break; } } } } </code></pre> <p>But I keep getting an "unknown error" on the line mySearcher.FindAll(). Anybody see an obvious problem here? Am I specifying the ou and uid correctly?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload