ASP, LDAP and Active Directory

J

Jayashree Iyer

I have an ASP page acessing an LDAP server (Exchange server on Windows
2000).
I tried running the asp query on the machine that contains the LDAP
server, and it worked fine, returning the correct no of records.
I subsequently moved the page to anotehr machine on the network, but
here, it gives me a recordcount of 0 when i try running it.
Any ideas on what could be the problem?
I read somewhere that EXchange Server and IIS have to be on the same
physical machine to use the ADSDSO object.
is that true?
is there any other way to work around that then?
Any help would be appreciated. Im attaching my code below.
<%
Set Conn=CreateObject("ADODB.Connection")
Conn.Provider="ADSDSOObject"
Conn.Open "ADs Provider"
Qvar="<LDAP://daa21366ads001>;((objectClass=user)(showinaddressbook=CN=Global
Address List,OU=Microsoft
Exchange,OU=CMC,OU=corp-i,OU=Organizations,o=corp-i,o=corp));*;subtree"
Set rs=Server.CreateObject("ADODB.RecordSet")
rs.Open QVar,Conn
if rs.supports(adApproxPosition) then
if rs.Supports(adBookmark) then
Response.Write(rs.RecordCount)
end if
end if

%>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,990
Messages
2,570,211
Members
46,796
Latest member
SteveBreed

Latest Threads

Top