ADSI - GetObject Fails

ADSI - GetObject Fails

Post by David Schraf » Fri, 13 Oct 2000 04:00:00



Greetings all:

Any thoughts on this problem would be appreciated -

--------------------------------------------------------------------
    Dim MyNamespace As IADsOpenDSObject
    Dim oRootDSE As ActiveDs.IADs
    Dim oConn As ADODB.Connection

    On Error GoTo Err_Handle

    Set oRootDSE = GetObject("LDAP://RootDSE") 'INVALID SYNTAX ERROR IS
RAISED
    Set oConn = New ADODB.Connection

    oConn.ConnectionString = "Provider=ADsDSOObject"
    oConn.CursorLocation = adUseClient
    oConn.Open

    m_sRootDSE = oRootDSE.Get("defaultNamingContext")

    Set oRootDSE = Nothing
    Exit Sub

Err_Handle:
    Err.Raise Err.Number, Err.Source, Err.Description, Err.HelpFile,
Err.HelpContext
--------------------------------------------------------------------

When Set oRootDSE = GetObject("LDAP://RootDSE") is executed, the following
error results:

Run-time error '-2147221020 (800401e4)':

Automation error
Invalid syntax

We attempted to solve the problem by giving my account administrator access
on the server, which introduced no noticeable changes.  The line in question
works properly on other machines accessing active directory on the server.
I am running Windows 2000 Professional (original version - no service pack)
and VB6 (SP4).

Thanks in advance...

 
 
 

ADSI - GetObject Fails

Post by David Schraf » Sat, 14 Oct 2000 04:00:00


And, after a long week, I find myself responding to my own newsgroup
postings...

For the record:

The problem is solved - upon examing HKEY_CLASSES_ROOT\ldap\ I discovered
that there was no Clsid assigned.  This exaplained the problem.  Upon
assigning a Clsid manually, everything works as expected.  The only curious
aspect, to me, is that the Clsid was not assigned to begin with - but there
are things that will never be known.

 
 
 

ADSI - GetObject Fails

Post by Pinak » Thu, 19 Oct 2000 04:00:00


Hi david.

I have the same problem. I already have the CLSID, but i still cannot get
RootDSE from either VB or VC++. Can you help, please ?

thank you.



Quote:> And, after a long week, I find myself responding to my own newsgroup
> postings...

> For the record:

> The problem is solved - upon examing HKEY_CLASSES_ROOT\ldap\ I discovered
> that there was no Clsid assigned.  This exaplained the problem.  Upon
> assigning a Clsid manually, everything works as expected.  The only
curious
> aspect, to me, is that the Clsid was not assigned to begin with - but
there
> are things that will never be known.

 
 
 

1. Adsi - error using getobject(LDAP: etc.)

Hello, I've installed the sample adsi app from Tom Rizzo's book -
Programming Outlook and Exchange. I'm wanting to use the logged-on user
credentials instead of the login page so I want to replace the
"OpenDSObject" line (which was working) with a "GetObject" line for
connecting to the recipients container. I get an 80005000 error, bad
pathname? with the following line:
Set objCont = GetObject
("LDAP://EX01TS299A/cn=Recipients,ou=HOTEST,o=ICBCTEST")

but this line works to connect to a recipients mailbox:
Set objCont = GetObject
("LDAP://EX01TS299A/cn=JAMER,cn=Recipients,ou=HOTEST,o=ICBCTEST")

I've tried different formatting etc. but no luck. I have 'permission
admin' rights. Any ideas appreciated.

Deb

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

2. C++ new & delete

3. adsi - error using getobject (ldap:...)

4. DRDOS FileLink 2.00 cable (HELP!)

5. GetObject (WinNT://Mydomain/MyGroup) failed !!

6. Why isn't TeX dynamic ?

7. unstable LDAP. GetObject() intermittently fails

8. Pb of network configuration

9. GetObject fails when accessig webpage from remote computer

10. GetObject (WinNT://Mydomain/MyGroup) failed !!

11. getobject failed after applying SRP

12. Publish certificate in Active Directory using ADSI failed(80070005)

13. VBS file succeeds where ADSI fails