在客户端如何知道LDAP服务器参数:---The specified domain either does not exist or could not be contacted.
protected void Button1_Click(object sender, EventArgs e){
string adPath= "LDAP://DC=test,DC=voww,DC=com";
//Path to your LDAP directory server
string domain = "test.voww.com";
string username = Name.Text.ToString();
string password = pwd.Text.ToString();
string domainAndUsername = domain + @"\" + username;
string adPath = path.Text.ToString();
DirectoryEntry entry = new DirectoryEntry(adPath, domainAndUsername, password);
try
{
//Bind to the native AdsObject to force authentication.
object obj = entry.NativeObject;
这句出错,也就是说我给出的adPath和domain出错,请问有没有办法在客户端知道这两个参数.公司的LDAP服务器在美国,和那边联系很不方便.
谢谢了
}
}
--------------------编程问答-------------------- 在域控制器上可以登陆,但不知道为什么把代码放到其他域的机器上就登陆失败,老是说找不到The specified domain either does not exist or could not be contacted. --------------------编程问答-------------------- 谁知道怎么会事啊 --------------------编程问答-------------------- 顶 --------------------编程问答-------------------- 顶!! --------------------编程问答-------------------- 不晓得,没搞过... --------------------编程问答-------------------- 我也是这种问题,
顶一下
补充:.NET技术 , ASP.NET