Expand|Select|Wrap|Line Numbers
- DirectoryEntry newUser = deContainer.Children.Add("CN=" + username, "User");
- newUser.Invoke("Put", new object[] { "sAMAccountName", "testuser" });
- newUser.Invoke("Put", new object[] { "sn", "user1" });
- newUser.Invoke("Put", new object[] { "testprop1", "will work" }); //custom property
- newUser.CommitChanges();
- newUser.Close();
The specified directory service attribute or value does not exist. (Exception from HRESULT: 0x8007200A)
I'm uncertain as to what exactly is wrong. I've search around to find nothing odd about the syntax. Any assistance would be appreciated. Thanks...