Skip to content

Cannot consume TrustedCertificatesDirectory from netfx app #113947

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ericstj opened this issue Mar 26, 2025 · 1 comment · Fixed by #113963
Closed

Cannot consume TrustedCertificatesDirectory from netfx app #113947

ericstj opened this issue Mar 26, 2025 · 1 comment · Fixed by #113963
Assignees
Labels
area-System.DirectoryServices in-pr There is an active PR which will close this issue when it is merged tenet-compatibility Incompatibility with previous versions or .NET Framework
Milestone

Comments

@ericstj
Copy link
Member

ericstj commented Mar 26, 2025

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

@dotnet-policy-service dotnet-policy-service bot added the untriaged New issue has not been triaged by the area owner label Mar 26, 2025
Copy link
Contributor

Tagging subscribers to this area: @dotnet/area-system-directoryservices, @jay98014
See info in area-owners.md if you want to be subscribed.

@steveharter steveharter self-assigned this Mar 27, 2025
@steveharter steveharter added this to the 10.0.0 milestone Mar 27, 2025
@steveharter steveharter added regression-from-last-release tenet-compatibility Incompatibility with previous versions or .NET Framework and removed untriaged New issue has not been triaged by the area owner regression-from-last-release labels Mar 27, 2025
@dotnet-policy-service dotnet-policy-service bot added the in-pr There is an active PR which will close this issue when it is merged label Mar 27, 2025
@github-actions github-actions bot locked and limited conversation to collaborators May 25, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-System.DirectoryServices in-pr There is an active PR which will close this issue when it is merged tenet-compatibility Incompatibility with previous versions or .NET Framework
Projects
None yet
2 participants