DirectoryEntry oDE = new DirectoryEntry(\"LDAP://DC=Test1,DC=Test2,DC=gov,DC=lk\");
using (DirectorySearcher ds = new DirectorySearcher(oDE))
{
ds.PropertiesToL
In my case I was seeing referrals when I was accessing AD via SSO with an account in a trusted domain. The problem went away when I connected with explicit credentials in the local domain.
i.e. I replaced
DirectoryEntry de = new DirectoryEntry("blah.com");
with
DirectoryEntry de = new DirectoryEntry("blah.com", "someguy@blah.com", "supersecret");
and the problem went away.