title: LDAP with dotnet core under Linux
body: <p>I am developing an application based on .net core (2.2.103) which must connect to an LDAP server. On my development machine running Windows, I used the <code>System.DirectoryServices</code> namespace to do so. 
  However, the application will have to run on Linux (Ubuntu) and I got a <code>PlatformNotSupportedException</code>, so I added a reference to
  <code>&lt;PackageReference Include="Novell.Directory.Ldap" Version="2.2.1" /&gt;</code> and used that.</p>
  
  <p>Unfortunately, this throws another <code>PlatformNotSupportedException</code> (but because of Thread abort) when the Connection is disposed:</p>
  
  <pre><code>Unhandled Exception: System.PlatformNotSupportedException: Thread abort is not supported on this platform.
     at System.Threading.Thread.Abort()
     at Novell.Directory.Ldap.Connection.Dispose(Boolean disposing, String reason, Int32 semaphoreId, InterThreadException notifyUser)
     at Novell.Directory.Ldap.Connection.destroyClone(Boolean apiCall)
     at Novell.Directory.Ldap.LdapConnection.Finalize()
  </code></pre>
  
  <p>Is there any reliable LDAP implementation for dotnet core on Linux?</p>