I want to know is there any api provided in .Net to get all supported ldap controls for given domain ? In 'Ldp' utility when we bind to certain domain we get to see all supported ldap controls OID. I want this list through .Net. Or is it possible that check if certain ldap control is supported when OID of control is provided.
Asked
Active
Viewed 400 times
0
-
I got answer from one of the stackoverflow thread. http://stackoverflow.com/questions/1646518/iplanet-ldap-and-c-sharp-pageresultrequestcontrol – sagar Aug 26 '14 at 12:31
2 Answers
0
There's documentation that tells you which LDAP controls are supported:
http://msdn.microsoft.com/en-us/library/aa813628(v=vs.85).aspx

ThomasC
- 108
- 1
- 8
0
I got answer from one of the stackoverflow thread. iPlanet LDAP and C# PageResultRequestControl
LdapConnection lc = new LdapConnection("ldap.server.name");
// Reading the Root DSE can always be done anonymously, but the AuthType
// must be set to Anonymous when connecting to some directories:
lc.AuthType = AuthType.Anonymous;
using (lc)
{
// Issue a base level search request with a null search base:
SearchRequest sReq = new SearchRequest(
null,
"(objectClass=*)",
SearchScope.Base,
"supportedControl");
SearchResponse sRes = (SearchResponse)lc.SendRequest(sReq);
foreach (String supportedControlOID in
sRes.Entries[0].Attributes["supportedControl"].GetValues(typeof(String)))
{
Console.WriteLine(supportedControlOID);
}
}