-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
System.DirectoryServices.AccountManagement Version 9.0: UserPrincipal.GetAuthorizationGroups() throws System.UriFormatException: Invalid URI: The hostname could not be parsed. #109858
Comments
I have the same issue with GetGroups(). Works in 8.0, not in 9.0. |
No repro for me with the given code sample I get the same results from both package versions. Could you please share the full details of the exception and callstack? Could you confirm what runtime are you using - .NET 8.0 or .NET 9.0? Thanks. |
I have created a new console application (.NET 9.0) and added the code I mentioned to Program.cs.
Then I added System.DirectoryServices.AccountManagetment 9.0.0 and ran the code HResult: -2146233033 |
I can confirm @jasasa's comment that the problem goes away if I add the name of our domain to the following line: |
@kumarravik78c is it possible you can provide a fix for this? Thanks |
@jasasa @uwer62 do you have examples of what was throwing? I verified that this throws: |
@steveharter Currently I only have the example and stack trace I had posted above. Are you looking for something specific? |
Description
After updating from 8.0.1 to 9.0.0 the call above throws the following exception:
System.UriFormatException: Invalid URI: The hostname could not be parsed.
Reproduction Steps
Expected behavior
This call should return the groups as the older versions
Actual behavior
Throws unexpected exception
Regression?
Yes. worked in 8.0.1
Known Workarounds
downgrade to 8.0.1
Configuration
.NET 8.0 and .NET 9.0 on Windows 11
Other information
No response
The text was updated successfully, but these errors were encountered: