Query LDAP with ASP

Discussion in 'ASP General' started by A Lake, Mar 22, 2005.

  1. A Lake

    A Lake Guest

    I'm trying to get user details using ASP under IIS (Win2000) with the
    following code:

    Set User = GetObject("WinNT://domainname/" & mid(strNTUser,8) & ",user")
    strNTUserFullName= User.Fullname

    The website this is running under uses Windows Authentication only (no
    anonymous logins) and this presumably is why I get the error 'General access
    denied error' from AD as the logged in user's credentials are not passed to
    the AD domain controller that is being queried for the users details.

    My question is, how to I get this to work whilst keeping Windows
    Authentication? I only need the most basic details about the user so writing
    LDAP queries and creating recordsets etc seems like overkill and presumably
    the same problem will occur?
     
    A Lake, Mar 22, 2005
    #1
    1. Advertising

  2. A Lake

    Ganesh Guest

    Hi,

    As far as I have worked with LDAP stuff, it requires the username and
    password to be passed to successfully connect to the server where your AD is.
    This username and password should be the authetication details of a user who
    has all rights to manipulate or access / query the AD, mostly an
    administrator group level user. So I think you need to supply the
    authentication details to work on LDAP.

    Ganesh

    "A Lake" wrote:

    > I'm trying to get user details using ASP under IIS (Win2000) with the
    > following code:
    >
    > Set User = GetObject("WinNT://domainname/" & mid(strNTUser,8) & ",user")
    > strNTUserFullName= User.Fullname
    >
    > The website this is running under uses Windows Authentication only (no
    > anonymous logins) and this presumably is why I get the error 'General access
    > denied error' from AD as the logged in user's credentials are not passed to
    > the AD domain controller that is being queried for the users details.
    >
    > My question is, how to I get this to work whilst keeping Windows
    > Authentication? I only need the most basic details about the user so writing
    > LDAP queries and creating recordsets etc seems like overkill and presumably
    > the same problem will occur?
    >
     
    Ganesh, Mar 23, 2005
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    1
    Views:
    536
    Raymond DeCampo
    Feb 21, 2006
  2. rcmn
    Replies:
    1
    Views:
    343
    =?ISO-8859-1?Q?Michael_Str=F6der?=
    Nov 6, 2006
  3. Jason Wold

    using LDAP Controls in ruby-ldap

    Jason Wold, Nov 4, 2004, in forum: Ruby
    Replies:
    5
    Views:
    258
  4. Ian Macdonald
    Replies:
    0
    Views:
    221
    Ian Macdonald
    Mar 15, 2005
  5. James Hughes
    Replies:
    4
    Views:
    334
    James Hughes
    Dec 13, 2005
Loading...

Share This Page