LDAP Bind using ASP - Please help

LDAP Bind using ASP - Please help

Post by hngo0 » Sat, 14 Jun 2003 00:01:56



Hi, I am trying to Bind LDAP with ASP... I  got this
error "8007054B". Any ideas?
Thanks


<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1">
</head>

<body>
<%
dim objRootDSE

Set objRootDSE = GetObject("LDAP://RootDSE")

response.Write("TESTING")

%>
</body>
</html>

.

 
 
 

LDAP Bind using ASP - Please help

Post by MSRe » Sat, 14 Jun 2003 00:38:22


Error code 8007054B says "The specified domain either does not exist or
could not be contacted.  You can always look from Error Lookup tool for the
error messages. It comes with Visual Studio IDE/Tools menu.

Now regarding the script,  I would think that  you are running the code
under local machine account. If you run under a domain user account that
should provide the result back.

Please try this :

dim objRootDSE

Set objRootDSE = GetObject("LDAP://YourDomainName/RootDSE")

Response.Wrtie ObjRootDSE.name

Thanks,
Regu.

This posting is provided "AS IS" with no warranties, and confers no rights.

 
 
 

1. Please help with LDAP / ASP

Hi all..

I have the standar example in VB:

---------------
    Set con = CreateObject("ADODB.Connection")
    Set Com = CreateObject("ADODB.Command")

    con.Provider = "ADsDSOObject"
    con.Open "Active Directory Provider"

    Set Com.ActiveConnection = con

    adDomainPath = "LDAP://orfeo/o=MAPS/ou=varea/cn=recipients"
    searchAlias = "r*"
    Com.CommandText = "select ADsPath, uid, title, givenName, sn,
physicalDeliveryOfficeName,telephoneNumber from '" & adDomainPath & "' where
uid= '" &     searchAlias & "'"

     Com.Properties("Page Size") = 100
    Com.Properties("Timeout") = 30 'seconds
    Com.Properties("searchscope") = ADS_SCOPE_SUBTREE 'Define in
ADS_SCOPEENUM
    Com.Properties("Cache Results") = False ' do not cache the result, it
results in less memory requirements

    Set rs = Com.Execute

    Do While Not rs.EOF
      debug.print "Alias     = " & rs.Fields("UID").Value
      rs.MoveNext
    Loop

-----------------------

The example runs ok but if try to execute in a ASP page i receive this
message all times:
"An invalid Active Directory pathname was passed "

The pathname is correct because works in Visual Basic!!!

Suggest???

Best regards

Jose Ma Rodriguez

2. Profiler in MSVC 5.0 doesn't work

3. Need help Using ASP to build LDAP queries

4. Call for AutoCAD BBS!!

5. using ADSI in ASP,please help

6. help picture acquisition card

7. Problem querying LDAP server using ADO .. Please help ...

8. OK, I give. I need to get by configuration back from my first installation

9. bind to object using adsi and asp.net/vb.net errors?

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

11. Unable to bind to LDAP with multivalued RDNs using ADSI

12. Binding to User object using LDAP

13. Can't get attribute values using LDAP (using VB) to non-MS LDAP server