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
%>
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
%>