MikeBronner
Programmer
Could someone post an example of ASP code used to query LDAP without any proprietary components?
Thanks! Take Care,
Mike
Thanks! Take Care,
Mike
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
<%@ Language=VBScript %>
<%
Option Explicit
response.buffer=true
Dim objGroup,objMember,groupldap,iLoop,tempstr,temparray,sortarray
%>
<html>
<head>
<script language=JScript runat=server>
function SortVBArray(arrVBArray) {
return arrVBArray.toArray().sort().join('\b');
}
</script>
</head>
<body>
<%
groupldap="[b]cn=groupname,dc=domain,dc=com[/b]"
Set objGroup = GetObject ("LDAP://"&groupldap&"")
tempstr=""
For each objMember in objGroup.Members
if tempstr<>"" then
tempstr=tempstr&"#"
end if
tempstr=tempstr&objMember.CN
next
Set objGroup=nothing
temparray=split(tempstr,"#")
SortArray = Split(SortVBArray(temparray), Chr(8))
For iLoop = LBound(SortArray) to UBound(SortArray)
response.write SortArray(iLoop)%><br>
<%next%>
</body>
</html>