代码改变世界

随笔档案-2008年8月7日

DirectoryEntry类使用注意事项

2008-08-07 11:03 by 迭_戈, 1075 阅读, 收藏,
摘要: 如果开发的电脑没有加入域,而拥有某个域的帐号。现在要取得这个域的相关信息。using System.DirectoryServices;string path = "LDAP://dc/dc=soft,dc=com"; DirectoryEntry user = new DirectoryEntry(path, "userName", "password");如果不事先通过windows登陆到域服... 阅读全文