You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With System.DirectoryServices.AccountManagement 9.0.1, PrincipalContext.ValidateCredentials with ContextType.Machine works only once for a user. Every subsequent call (even after restarting the application) fails with the following message
Multiple connections to a server or shared resource by the same user, using more than one user name, are not allowed. Disconnect all previous connections to the server or shared resource and try again. (Exception from HRESULT: 0x800704C3)
at System.DirectoryServices.AccountManagement.CredentialValidator.BindSam(String target, String userName, String password)
at System.DirectoryServices.AccountManagement.CredentialValidator.Validate(String userName, String password)
at System.DirectoryServices.AccountManagement.PrincipalContext.ValidateCredentials(String userName, String password)
It does not happen in version 9.0.0
Reproduction Steps
Write a console app with the code below, using package references
Description
With System.DirectoryServices.AccountManagement 9.0.1, PrincipalContext.ValidateCredentials with ContextType.Machine works only once for a user. Every subsequent call (even after restarting the application) fails with the following message
Multiple connections to a server or shared resource by the same user, using more than one user name, are not allowed. Disconnect all previous connections to the server or shared resource and try again. (Exception from HRESULT: 0x800704C3)
at System.DirectoryServices.AccountManagement.CredentialValidator.BindSam(String target, String userName, String password)
at System.DirectoryServices.AccountManagement.CredentialValidator.Validate(String userName, String password)
at System.DirectoryServices.AccountManagement.PrincipalContext.ValidateCredentials(String userName, String password)
It does not happen in version 9.0.0
Reproduction Steps
Write a console app with the code below, using package references
The app will run only once, all subsequent runs will give the above error
Expected behavior
The call should not fail on subsequent runs of the application
Actual behavior
It runs correctly once, and then never again until restarting the Workstation service.
Regression?
Yes, it works correctly with
Known Workarounds
restarting the Workstation service, or using COM interop directly (haven't tried)
Configuration
.net 8
Windows 11 Pro, build 26100.2894 x64
I guess it is not specific to this config
Other information
I think it is exactly the same issue as #83269 but that one is already closed.
The text was updated successfully, but these errors were encountered: