Using ADSI Across Domains


Hello,

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?

Thanks!
mookaAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

mookaAuthor Commented:

Nevermind!

wasnt security, just bad error logging. I was getting the objADSI.Manager attribute when there wasn't any.
EE_AutoDeleterCommented:
mooka,
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.

EE_AutoDeleter

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.