There is not any error message is mentioned in the question. Note, if the credentials are incorrect, the ds.FindOne() method will throw an exception, as it relies on the user's credentials for connecting to AD. This method may not be the most efficient means of validating credentials. For improved performance. If you work on .NET 3.5 or newer (yes you are using 4.6.1), you can use the
System.DirectoryServices.AccountManagement
namespace and easily verify your credentials:
using(PrincipalContext pc = new PrincipalContext(ContextType.Domain, "YOURDOMAIN"))
{
bool isValid = pc.ValidateCredentials("myuser", "mypassword");
}
Reference: Read all about it here:
https://stackoverflow.com/questions/290548/validate-a-username-and-password-against-active-directory/11033489#11033489[
^]