connecting to the WinNT:// namespace from asp

T

t.schwenk

hi ng!

for our intranet i try to connect to the WinNT://
namespace from an asp (or from global.asa) to retrieve the
usergroups which the current user is in (in order to
regulate intranet-access).

so i use:
sUser = Request.ServerVariables("LOGON_USER")
sUser = Right(sUser, Len(sUser) - InStr(sUser, "\"))
Set objUser = GetObject("WinNT://company/" & sUser
& ",user")

that works fine on my local machine, but when i copy the
file to our intranet-server i get a 'permission denied'
error in the line of the GetObject-statement.

now i found that knowledge-base-article 248187
http://support.microsoft.com/default.aspx?scid=kb;EN-
US;248187
which states, that i have to impersonate an admin-user to
connect to WinNT:// ...
i followd their guideline and created the LoginAdmin.dll
and registered it.
now i get 'Error Type:(0x8007052E)' which (according to
internet-sources) translates to 'unknown username or bad
password' ... again in the codeline of the GetObject-
statement.

has anybody experienced the same or does anybody run an
intranet with access-permissioning by adsi??

i have searched the entire web, read so many articles
(which did apply only to parts of the problem) and i don't
know what to search for next, anymore.
i'm grateful for any hint in the right direction or any
contact that is familiar with the problem.

thanks a lot!


cheers
thilo
 
M

Mark Schupp

have a look at the OpenDSObject method. it allows you to pass the user id
and password of an account to use for directory server permission. I have
not used it in the context you want but it may work for you.

set objLDAP = GetObject("WinNT:")

set objUser = objLDAP.OpenDSObject( _
strBinding, _
strAdminID, _
strPassword, 1 )


--
Mark Schupp
--
Head of Development
Integrity eLearning
Online Learning Solutions Provider
(e-mail address removed)
http://www.ielearning.com
714.637.9480 x17
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,226
Members
46,815
Latest member
treekmostly22

Latest Threads

Top