Skip to content

System.DirectoryServices.AccountManagement - Invalid URI after upgrade to 9.0 #110400

@maxima120

Description

@maxima120

Description

I have stable WPF .NET 8 app. After upgrading System.DirectoryServices.AccountManagement from 8.0.1 to 9.0 I got this error:

System.UriFormatException: 'Invalid URI: The hostname could not be parsed.'

Reproduction Steps

var ctx = new PrincipalContext(ContextType.Domain);
var usr = UserPrincipal.FindByIdentity(ctx, IdentityType.SamAccountName, "myname");
var test = usr.GetGroups();

Expected behavior

no exception

Actual behavior

exception

Regression?

Worked for couple years now.

Known Workarounds

Downgrade to 8.0.1 solves this immediately.

Configuration

Windows 10 Enterprise with login via LDAP.

Other information

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions