LDAP and ADSI: please help...

LDAP and ADSI: please help...

Post by lutsch.. » Wed, 01 Nov 2000 23:25:43



Hi.

I'm a newbie in this domain.

Could anyone give me a code snippet on how to query a standard LDAP-
server (like Netscape) and to create a user in the Win2000 Active
directory using the VB scripting language?


Sent via Deja.com http://www.deja.com/
Before you buy.

 
 
 

1. Okay ...please help with LDAP and ADSI...my code is included...

I had previously asked this question and now I have included my code:

Need urgent help with LDAP and DirectorySearcher class using
VB.NET.
I am currently using LDAP to access a specified x500 directory
to retrieve DNs and mHsORAddresses.  I can easily get the
DNs since they are straight strings by looping through the
DirectorySearcher data type (ie., mySearcher) and
filtering per 'distinguishedname'.  However, for the
'mhsoraddresses' attribute, I get this error...

"Handling of this ADSVALUE is not yet implemented (type = 0xb)"

I don't know how to resolve this.  Is mhsoraddress an ASN.1
structure? If it is, then how do I dereference it so I can
get the data properly?

My code:

******************************************************
      Dim NEWentry As New
DirectoryServices.DirectoryEntry(g_LDAP_EntryPoint)
      Dim mySearcher As New
System.DirectoryServices.DirectorySearcher(NEWentry)
      mySearcher.PropertiesToLoad.Add("mhsoraddresses")

      Dim res As SearchResult
      For Each res In mySearcher.FindAll()
         Dim ien As IDictionaryEnumerator =
res.Properties.GetEnumerator()
         While ien.MoveNext()
           If ien.Key.ToString() = "mhsoraddresses" Then
            Dim str As String
            str = CType(res.Properties(ien.Key.ToString())(0), String)
           End If
         End While
      Next
********************************************************

When I try to debug this code and check 'str', i get the exception
error complaining about the ADSVALUE not being implemented....how do i
get str
to contain the mhsoraddress value?  If it is not a string, how do I
dereference it??

Joe Kaplan, I checked the security permissions and i should be able to
see values since I have a third-party C++ code (with tons of decode
code..yuck!) that is able go to the remote directory and actually
decode the value.  Of course, I am using VB.NET and stuck with ADSI.

Any help would be appreciated.  Thanks!

Coolycat

2. PH SERVER

3. Please help me (ldap:// and adsi) - error: 8007052e

4. Logging RAS Connections

5. ADSI, LDAP and username syncronization help please...

6. Halo online in Europe

7. Please help - adsi ldap interface

8. Cable Modem Router upgrade

9. Problem with ADSI with LDAP server Through ASP...HELP HELP !!!

10. ADSI LDAP client: Can it really connect to most LDAP server implementations?

11. ADSI LDAP Provider doesn't work on Windows NT 4.0 against Syntegra LDAP Server

12. ADSI LDAP query help

13. Help ADSI / Third Party LDAP