I am a newbie at Vbscript and LDAP
I have the following piece of code literally from the books:
-----------
<%
Dim RootDSE
Dim UserContainer
Dim User
Dim RelativePathFromDomainToUserContainer
RelativePathFromDomainToUserContainer = "OU=Helpdesk,OU=Beheerders,OU=CAK-USERS,"
Set RootDSE = GetObject("LDAP://RootDSE")
Set UserContainer = GetObject("LDAP://" & RelativePathFromDomainToUserContainer & RootDSE.Get("DefaultNamingContext"))
UserContainer.Filter = Array("User")
For Each User in Usercontainer
Response.Write User.AdsPath & "<BR>"
Next
%>
-----------
It is supposed to give me all the User Class Objects in that container. Unfortunately all i get is:
-----------
error '80005000'
/adsibook2.asp, line 19
-----------
Does this sound familiar to anyone or can anyone see what i am doing wrong, if so please help me out. I've been struggling with this for quite some time now, but i can't seem to get it to work by myself :-(
I have the following piece of code literally from the books:
-----------
<%
Dim RootDSE
Dim UserContainer
Dim User
Dim RelativePathFromDomainToUserContainer
RelativePathFromDomainToUserContainer = "OU=Helpdesk,OU=Beheerders,OU=CAK-USERS,"
Set RootDSE = GetObject("LDAP://RootDSE")
Set UserContainer = GetObject("LDAP://" & RelativePathFromDomainToUserContainer & RootDSE.Get("DefaultNamingContext"))
UserContainer.Filter = Array("User")
For Each User in Usercontainer
Response.Write User.AdsPath & "<BR>"
Next
%>
-----------
It is supposed to give me all the User Class Objects in that container. Unfortunately all i get is:
-----------
error '80005000'
/adsibook2.asp, line 19
-----------
Does this sound familiar to anyone or can anyone see what i am doing wrong, if so please help me out. I've been struggling with this for quite some time now, but i can't seem to get it to work by myself :-(