I've an application with a logon screen for users to authenticate themselves against the domain. I've made use of the System.DirectoryServices.AccountManagement PrincipalContext/UserPrincipal classes for this.
PrincipalContext domain = new PrincipalContext(ContextType.Domain, "mydomain"); if (domain.ValidateCredentials(UserName, Password)) { //do stuff }
This works quite well in the vast majority of cases. However, for a few select people, this "domain.ValidateCredentials" method will automatically prompt for a smart card insertion when it finds that the UserName is valid in the domain. Simply closing the prompt again will allow my application to proceed, but I would much rather get rid of it completely.
I've not had much luck finding a cause/solution for this. Any assistance would be appreciated!
https://stackoverflow.com/questions/67417604/disabling-unwanted-smart-card-prompt May 06, 2021 at 07:54PM
没有评论:
发表评论