Description
LdapConnection fails to bind on Linux when running .NET 6.0.0-rc.2.21480.5 version of System.DirectoryServices.Protocols package and throws
Unhandled exception. System.DirectoryServices.Protocols.LdapException: The feature is not supported.
at System.DirectoryServices.Protocols.LdapConnection.BindHelper(NetworkCredential newCredential, Boolean needSetCredential)
at System.DirectoryServices.Protocols.LdapConnection.Bind()
The same code works when using switching to version 5.0.0 of System.DirectoryServices.Protocols or running under windows
Reproduction Steps
Run the following code under Linux
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="System.DirectoryServices.Protocols" Version="6.0.0-rc.2.21480.5" />
</ItemGroup>
</Project>
using System.DirectoryServices.Protocols;
using System.Net;
var di = new LdapDirectoryIdentifier(server: "ad.almirex.com", 389);
var connection = new LdapConnection(di, new NetworkCredential("username","password","almirex.dc"));
connection.Bind();
Console.WriteLine("Hello, World!");
If the package version is switched to 5.0.0, the above code works.
Expected behavior
The code works
Actual behavior
The code throws
Regression?
This worked in .NET 5 version of the package.
Known Workarounds
None
Configuration
Tested with .NET 6.0.100-rc.2.21505.57 SDK on WSL2 Ubuntu
Other information
No response
Description
LdapConnectionfails to bind on Linux when running .NET6.0.0-rc.2.21480.5version ofSystem.DirectoryServices.Protocolspackage and throwsThe same code works when using switching to version 5.0.0 of
System.DirectoryServices.Protocolsor running under windowsReproduction Steps
Run the following code under Linux
If the package version is switched to
5.0.0, the above code works.Expected behavior
The code works
Actual behavior
The code throws
Regression?
This worked in .NET 5 version of the package.
Known Workarounds
None
Configuration
Tested with .NET 6.0.100-rc.2.21505.57 SDK on WSL2 Ubuntu
Other information
No response