asp로 ADSI 프로그래밍을 했는데요.
바인딩 후 속성값들을 볼려고 하는데, ADsPath 밖에 나오질 않습니다.
그리고 밑에 질문드렸던 검색하는 문제도 마찬가지로 ADsPath밖에 찾질 못하고 있습니다.
제가 지금 하고 있는것은 DC Directory이구요.
아래 asp 소스가 DC Directory에서만 안되는 것인지 아니면 다른 LDAP 서버에서도 안되는 것인지 궁금하네요.
제가 볼 때 DC Directory에서 정의된 속성이름이 LDAP 표준과 좀 다른 듯 해서요.
그리구 DC Directory에서만 안된다면 왜 그러는 것인지 궁금합니다.
해결방안이 있는 것인지 고수님들께 조언 좀 부탁드립니다.
아래는 DC Directory에 나와 있는 것 중 description에 대한 예입니다.
Define OID Description
DisplayName Description
DottedOID 2.5.4.13
LDAPName description
asp 소스입니다. %를 ?로 모두 바꿨습니다.
<?
on error resume next
Dim strADsPath
strADsPath = Request.Form("ADsPath")
Dim strUserName
strUserName = Request.Form("UserName")
Dim strPassword
strPassword = Request.Form("Password")
Dim iFlags
iFlags = Request.Form("Flags")
?>
.
.
.
.
.
<?
if (not strADsPath= "") then
' bind to the ADSI object. If user has supplied a username, then
' authenticate too
Dim oADsObject
if (strUserName = "") then
response.write "Not Authenticating"
Set oADsObject = GetObject(strADsPath)
else
response.write "Authenticating"
Dim strADsNamespace
Dim oADsNamespace
strADsNamespace = left(strADsPath, instr(strADsPath, ":"))
set oADsNamespace = GetObject(strADsNamespace)
Set oADsObject = oADsNamespace.OpenDSObject(strADsPath, strUserName, strPassword, 0)
end if
' we've only managed to bind if err.number = 0
if not (Err.number = 0) then
Response.Write "Failed to bind to object " & strADsPath
response.write err.description
Response.write "Error number is " & err.number
else
Response.Write "Currently viewing object at " & oADsObject.ADsPath
Response.Write "Class is " & oADsObject.Class
dim oOu
Set oOu = oADsObject.GetObject("User", "cn=userid")
oOu.GetInfo
response.write "1 " & oOu.cn
response.write "2 " & oOu.sn
response.write "3 " & oOu.description
response.write "4 " & oOu.email
response.write "5 " & oOu.TelephoneNumber
response.write "6 " & oOu.ADsPath
response.write "7 " & oOu.mobile
response.write "8 " & oOu.homePhone
end if
end if
?>
|