title: "A referral was returned from the server" error only while querying LDAP from outside the domain
body: <p>I have 2 domains in the forest. 2nd one is the child domain of the first one. Like below...</p>
  
  <p>Domain1 = <strong>abc.com</strong> on machine machine1
  Domain2 = <strong>child.abc.com</strong> on machine macnihe2</p>
  
  <p>I have c# application which tries to create a DirectoryEntry on the child domain. </p>
  
  <p>LDAP://machine1/OU_IN_CHILD_DOMAIN/PARENT_DOMAIN_USERNAME_AND_PASSWORD</p>
  
  <p>This works when my c# application is on parent domain i.e on <strong>abc.com</strong> but if my c# application is on any un-related domain like <strong>unrelateddomain.com</strong>, I get <strong>A referral was returned from the server</strong> error.</p>
  
  <p>Please let me know why is this? In first case AD is able to do 'Referral chasing' but not in second case. Is there something am I missing?</p>