1.0 KiB
1.0 KiB
author | date | slug | status | title | comments | wordpress_id | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
bascht | 2007-03-22 | ldaps-abfragen | publish | LDAP's abfragen... | true | 63 |
|
...ist ja garnicht so schwer wie ich dachte. Die Novell LDAP
Bindings für C# einbinden, ein fixes
using Novell.Directory.Ldap;
und fertig ist die Suppe. Einzig der
RFC 2254 für die Abfrage
ist noch etwas kryptisch geschrieben. Das wird noch.
this.ldapConn = new LdapConnection(); ldapConn.Connect(HtwmLdap.ldapServer, HtwmLdap.ldapPort);
Und dann einfach in einer Exceptionbehandlung
LdapSearchQueue queue = ldapConn.Search (HtwmLdap.baseDN, LdapConnection.SCOPE_ONE, "(sn=Lehma*) | (sn=Schu*)", null, false, (LdapSearchQueue) null, (LdapSearchConstraints) null );
liefert jedenfalls schonmal ordentlich viele Ergebnisse. (Kein
Wunder, wenn man nach Lehma* und Schu* sucht. :)