Hello forum.
Something strange happens with my web server.
I'm trying to use ADSI to extract user information from LDAP.
Web server that I'm using is - of course IIS installed on Win2k. As well I installed the ADSI from the disk. And promoted the machine to be AD server( after thet I verified that GlobalCatalog is set on that machine).
Then I'm trying to extract the information from LDAP to asp page using ADO.
Here is the snippet of what is going on:
***********************************************************
<%
Set adsiConnection = CreateObject("ADODB.Connection"
adsiConnection.Open = "Provider=ADsDSOObject"
Set adsiCommand = CreateObject("ADODB.Command"
Set adsiCommand.ActiveConnection = adsiConnection
adsiCommand.CommandText = " SELECT ADsPath, cn FROM 'LDAP://DC=DOMAIN' WHERE cn='Administrator'"
Set adsiRecords = adsiCommand.Execute
'adsiRecords.MoveFirst
Do While Not adsiRecords.EOF
For i=0 To adsiRecords.Fields.Count - 1
Response.Write(adsiRecords.Fields(i).Value)
Next
adsiRecords.MoveNext
Response.Write("<br>"
Loop
%>
For some stupid reason - I'm getting the empty page.
Please help - I'spent 3 days on trying to get results.
Thanks,
Yuri.
Something strange happens with my web server.
I'm trying to use ADSI to extract user information from LDAP.
Web server that I'm using is - of course IIS installed on Win2k. As well I installed the ADSI from the disk. And promoted the machine to be AD server( after thet I verified that GlobalCatalog is set on that machine).
Then I'm trying to extract the information from LDAP to asp page using ADO.
Here is the snippet of what is going on:
***********************************************************
<%
Set adsiConnection = CreateObject("ADODB.Connection"
adsiConnection.Open = "Provider=ADsDSOObject"
Set adsiCommand = CreateObject("ADODB.Command"
Set adsiCommand.ActiveConnection = adsiConnection
adsiCommand.CommandText = " SELECT ADsPath, cn FROM 'LDAP://DC=DOMAIN' WHERE cn='Administrator'"
Set adsiRecords = adsiCommand.Execute
'adsiRecords.MoveFirst
Do While Not adsiRecords.EOF
For i=0 To adsiRecords.Fields.Count - 1
Response.Write(adsiRecords.Fields(i).Value)
Next
adsiRecords.MoveNext
Response.Write("<br>"
Loop
%>
For some stupid reason - I'm getting the empty page.
Please help - I'spent 3 days on trying to get results.
Thanks,
Yuri.