Skip to content

Cannot consume TrustedCertificatesDirectory from netfx app #113947

@ericstj

Description

@ericstj

Description

See https://github.com/dotnet/runtime/pull/111877/files#r2014992550

That PR added TrustedCertificatesDirectory for netstandard2.0 but it's not implemented for netfx.

The netstandard2.0 surface area for DirectoryServices.Protocols must remain in sync with what is in netfx, since netstandard2.0 is compatible with netfx and the package doesn't provide a new netfx implementation.

Reproduction Steps

Run attached app: tcd.zip

Expected behavior

Compile error using TrustedCertificatesDirectory from netstandard.

Actual behavior

It will fail with:

Unhandled Exception: System.MissingMethodException: Method not found: 'Void System.DirectoryServices.Protocols.LdapSessionOptions.set_TrustedCertificatesDirectory(System.String)'.
   at lib.Class1.Test(LdapSessionOptions options, String certDir)
   at Program.<Main>$(String[] args) in C:\scratch\tcd\app\Program.cs:line 5

Regression?

Not really, new API in net10.0 (backported in servicing)

Known Workarounds

Don't call the API if you wish to run on .NETFramework.

Configuration

No response

Other information

No response

Metadata

Metadata

Assignees

Labels

area-System.DirectoryServicesin-prThere is an active PR which will close this issue when it is mergedtenet-compatibilityIncompatibility with previous versions or .NET Framework

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions