且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

在AD中创建用户时拒绝访问

更新时间:2023-12-01 21:27:40

获得directyentry用户名和密码的解决方案。



Got solution with username and password for directyentry.

static DirectoryEntry  DirectEntry(string ou)  
      {  
        
         string ldapname = "sharepointtest";
         string name = "h.com.sa" + @"\" + ldapname;
          DirectoryEntry ldapConnection = new DirectoryEntry("rch");
          ldapConnection.Path = "LDAP://OU=CEO,OU=ORGANIZATION CHART,DC=h,DC=com";
          ldapConnection.Username = name;
          ldapConnection.Password = "123";
          return ldapConnection;  
      }