Thanks Joe.
I am using authintication from Listing 12.2.
DirectoryEntry
root = new DirectoryEntry("LDAP://localhost:389/o=Microsoft,c=US");
It returns true;
But when i authenticate for user Test1 who's userPrincipalName ="Test1" and password = "Test1"
DirectoryEntry root = new DirectoryEntry("LDAP://localhost:389/o=Microsoft,c=US","Test1", "Test1",AuthenticationTypes.SecureSocketsLayer | AuthenticationTypes.FastBind );
It throws exception ex.ErrorCode = -2147016694
I tried with AuthenticationTypes.None as well as with distinguishedName = "CN=Test1,O=Microsoft,C=US"
but unsucessfull.
Is anything more required in this case?