Using ADSI Across Domains


I think I'm chasing my tail here and wanted some clarification.

I have a web program that needs to get information about the user from AD. I get the users DN and pass it to functions like:

Function ADUserData(strDN)

Set objADSI = GetObject("LDAP://" & strDN)
Session("Username") = objADSI.DisplayName
Set objADSI = Nothing

I have created all my AD functions into a ActiveX DLL and published as a com + object, running under a user account for its identity.

It is my understanding that all the functions called from this dll will be executed under the user context.

All works fine for users in the same domain. However when a user from a different domain visits the site, get the following error:

error 80005000 automation error

The account that the dll is running under is a domain admin has been granted rights in the other domain. If I put this function into a vbscript it works fine when run by the same user that is the identity of the DLL. What gives?

Who is Participating?
Because you have presented a solution to your own problem which may be helpful to future searches, this question is now PAQed and your points have been refunded.

mookaAuthor Commented:


wasnt security, just bad error logging. I was getting the objADSI.Manager attribute when there wasn't any.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.