我试图从Azure上运行的Web应用程序访问onpremises活动目录 . 我们选择了Azure Connect,因为它最符合我们的要求(对用户进行身份验证以及从Active Directory获取用户信息) .

我已按照此link1link2中提供的步骤操作,但仍无法实现目标 .

下面是方法,我试图测试是否可以从Azure访问onpremises Active Directory: DirectoryEntry.Exists("LDAP Path")

以下是我遇到的错误:

System.Runtime.InteropServices.COMException(0x8007054B):指定的域不存在或无法联系 . 在System.DirectoryServices.DirectoryEntry.Bind(Boolean throwIfFail)位于WebRole1.MyLogInPage.btnSubmit_Click(Object sender,EventArgs e)的System.DirectoryServices.DirectoryEntry.Exists(String path)

在运行Active Directory的服务器上,我可以看到连接 endpoints 软件运行正常而没有任何连接问题,并且 endpoints 组已正确设置 .