We use to authenticate user on AD using the following DirectoryEntry constructor:
new DirectoryEntry(path, domainName + "\\" + UserName, Password);
It use to work fine until the Domain Controller was changed.
Now to make it work we have to use:
new DirectoryEntry(path, UserName, Password);
Can anyone please explain difference and why the second method is working now and first is not working?
Note: I am not sure but I think the domain functional level where raised to Server 2008 from Server 2003. Does it make difference?