I have created a local user. (Ex: mymachine\user1). I do not want to add this user to administrator group.
I have used following c# code to validate my local account:
PrincipalContext contextmachine = new PrincipalContext(ContextType.Machine);
valid = contextmachine.ValidateCredentials(accountname, password);
But it is giving exception as:
Logon failure: the user has not been granted the requested logon type at this computer.
please help me if I m doing it in a right way.