string path = "LDAP://192.168.0.20/CN=users,DC=company,DC=ltm,DC=dom";
DirectoryEntry dir = new DirectoryEntry(path, admin, pass, AuthenticationTypes.ServerBind);
object value = dir.Properties["description"].Value;
dir.Properties["description"].Value = "test";
dir.CommitChanges();
코드는 COMException을 생성합니다 : "잘못된 DN 구문을"dir.Properties에서 [ "설명"] 값LDAP 잘못된는 DN 구문
을 내가 사용자 이름과 암호를 지정할과 교체하지 마십시오. 로하여 DirectoryEntry 초기화 :
DirectoryEntry dir = new DirectoryEntry(path);
dir.AuthenticationType = AuthenticationTypes.ServerBind;
은 그 때 나는 CommitChanges에서 UnauthorizedAccessException를 얻을.
무엇이 잘못 되었습니까에 대한 아이디어는 크게 감사하겠습니다.
예를하지만 나는이 컴퓨터에 연결된 장치가 작동하지 않는 나에게 알려주는 DirectoryServicesCOMException 얻을 :
그냥 좋아합니다. – remdao
@remdao, 귀하의 컴퓨터가 해당 도메인에 가입되어 있습니까? – Regent
내가 주장하는 컴퓨터에는 도메인이 없습니다. 그게 문제라고 생각합니다. 감사합니다. – remdao