title: Novell LDAP C# - Novell.Directory.Ldap - Has anybody made it work?
body: <p>I'm trying to use the library released by Novell (Novell.Directory.Ldap). Version 2.1.10.</p>
  
  <p>What I've done so far: </p>
  
  <ul>
  <li><p>I tested the connection with an application (<a href="http://www.mcs.anl.gov/~gawor/ldap/index.html" rel="noreferrer">LdapBrowser</a>) and it's working, so its not a communication problem.</p></li>
  <li><p>It's compiled in Mono, but I'm working with Visual Studio. So created a project with the sources. I also included a reference to Mono.Security, because the project depended on it.</p></li>
  <li><p>I commented a call (freeWriteSemaphore(semId); ) in the error catching part of the connection, because it was throwing more exceptions. I checked what that call did, and its just a error tracing mechanism.</p></li>
  <li><p>I followed the basics steps provided in the documentation by Novell (<a href="http://www.novell.com/coolsolutions/feature/11204.html" rel="noreferrer">http://www.novell.com/coolsolutions/feature/11204.html</a>). </p>
  
  <p>// Creating an LdapConnection instance </p>
  
  <p>LdapConnection ldapConn= new LdapConnection();
  ldapConn.SecureSocketLayer = ldapPort == 636;</p>
  
  <p>//Connect function will create a socket connection to the server</p>
  
  <p>ldapConn.Connect(ldapHost,ldapPort);</p>
  
  <p>//Bind function will Bind the user object Credentials to the Server</p>
  
  <p>ldapConn.Bind(userDN,userPasswd);</p></li>
  <li><p>Right now it's crashing at the Bind() function. I get the error 91. </p></li>
  </ul>
  
  <p>So, has someone ever used this library and seen it work? If so, what did you do to make it work, is there some special configuration needed? Is there a way to make it work in .NET environment without Mono (I can have references to Mono dlls, but I don't want it to be installed on the server)?</p>
  
  <p>(UPDATE)
  The connection is on port 636, thus using SSL. I checked with WireShark the communication and compared with what I get from LDAP Browser. I've seen that the step where the SSL certicate is communicated, is not done by the LDAP library. So, what is the best way to make it do what its supposed to?</p>
  
  <p>(UPDATE) I checked the documentation and it's indicating that it doesn't support SSL. <a href="http://www.novell.com/coolsolutions/feature/11204.html" rel="noreferrer">http://www.novell.com/coolsolutions/feature/11204.html</a></p>
  
  <blockquote>
    <p>Authenticate to the LDAP server with
    LdapConnection.Bind(). We support only
    cleartext authentication. SSL/TLS
    support is yet to be added.</p>
  </blockquote>
  
  <p>But the documentation date from 2004, and since then, many updates have been made. And there is a parameter in the library to define if the connection uses SSL. So now I'm confused.</p>
  
  <p>(UPDATE) Found a more up-to-date documentation : <a href="http://developer.novell.com/documentation//ldapcsharp/index.html?page=/documentation//ldapcsharp/cnet/data/bqwa5p0.html" rel="noreferrer">http://developer.novell.com/documentation//ldapcsharp/index.html?page=/documentation//ldapcsharp/cnet/data/bqwa5p0.html</a>. The way the SSL connection is made, is by registering the certificate on the server. The problem is that what I'm doing is not bound to a specific Novell server, so the certificate must be obtained dynamically.</p>