DirectoryEntry userEntry = new DirectoryEntry("vmwin0019adz.itcenter.xxx.com.cn", "sp", "xx", AuthenticationTypes.Secure | AuthenticationTypes.Sealing | AuthenticationTypes.ServerBind);
这句出现
System.Runtime.InteropServices.COMException

解决方案 »

  1.   

    总算连上了,
                DirectorySearcher deSearch = new DirectorySearcher();
                deSearch.SearchRoot = de;
                deSearch.Filter = "(&(objectClass=user)(sAMAccountName=" + "yangd" + ")))";
                deSearch.SearchScope = SearchScope.Subtree;
                SearchResult results = deSearch.FindOne();            SearchResult results = deSearch.FindOne();
    这句抛异常:
    notsupported exception,
    提供程序不支持搜索操作因此无法搜索
    怎么设置可以搜索啊?
      

  2.   

    搞定了,已经写进博客
    http://blog.csdn.net/lude8880/archive/2010/03/17/5389734.aspx
      

  3.   

    谁知到怎么往用户加自己的字段,msn qq什么的?