“A referral was returned from the server” exception when accessing AD from C#

后端 未结 8 1408
不知归路
不知归路 2020-12-01 18:08
DirectoryEntry oDE = new DirectoryEntry(\"LDAP://DC=Test1,DC=Test2,DC=gov,DC=lk\");

using (DirectorySearcher ds = new DirectorySearcher(oDE))
{
    ds.PropertiesToL         


        
8条回答
  •  一生所求
    2020-12-01 18:39

    A referral is sent by an AD server when it doesn't have the information requested itself, but know that another server have the info. It usually appears in trust environment where a DC can refer to a DC in trusted domain.

    In your case you are only specifying a domain, relying on automatic lookup of what domain controller to use. I think that you should try to find out what domain controller is used for the query and look if that one really holds the requested information.

    If you provide more information on your AD setup, including any trusts/subdomains, global catalogues and the DNS resource records for the domain controllers it will be easier to help you.

提交回复
热议问题