active directory
שלום, אני מנסה להוסיף משתמש חדש, זה פשוט לא עובד,לא נוצר צומת חדש בעץ, קטע קוד להוספת משתמש חדש "TestUser":
שלום, אני מנסה להוסיף משתמש חדש, זה פשוט לא עובד,לא נוצר צומת חדש בעץ, קטע קוד להוספת משתמש חדש "TestUser":
//set the LDAP qualification so that the user will be created under the Users string path ="LDAP://../CN=Users,DC=..,DC=ac,DC=il" ; DirectoryEntry oDE= new DirectoryEntry(path,this.ADUser,this.ADPassword,AuthenticationTypes.Secure); DirectoryEntry oDEC=oDE.Children.Add("CN=TestUser","User"); oDEC.Properties["sAMAccountName"].Add("tuser"); oDEC.Properties["sn"].Add("user"); oDEC.Properties["givenName"].Add("test"); oDEC.Invoke ("SetPassword", new object[] {"#123456"}); oDEC.CommitChanges();
תודה