Use Active Directory Group in a dropdown form control

Discussion in 'ASP General' started by toomanymessi@gmail.com, Jan 25, 2006.

  1. Guest

    Hi,

    I am a newbe in ASP prog, and I am a little "bothered" about a script
    that I need.

    I would like to list IN our Active directory all group that begin named
    and start with "GRP-" to put in a dopsown list for a form.

    Somebody can help me ?

    Maybe for the begging, the code to only list group in AD to display in
    a webpage can be nice.

    Thanks
    , Jan 25, 2006
    #1
    1. Advertising

  2. dNagel Guest

    heres a place to start...

    I pulled this from : http://www.15seconds.com/issue/020130.htm


    Sub PullAllGroups(strDomain)
    Dim Computer
    Dim Group

    Set Computer = GetObject("WinNT://" & strDomain)
    Computer.Filter = Array("Group")
    For Each Group in Computer
    Response.Write Group.Name
    Next
    End Sub



    wrote:
    > Hi,
    >
    > I am a newbe in ASP prog, and I am a little "bothered" about a script
    > that I need.
    >
    > I would like to list IN our Active directory all group that begin named
    > and start with "GRP-" to put in a dopsown list for a form.
    >
    > Somebody can help me ?
    >
    > Maybe for the begging, the code to only list group in AD to display in
    > a webpage can be nice.
    >
    > Thanks
    >
    dNagel, Jan 25, 2006
    #2
    1. Advertising

  3. Guest

    Thanks for you help,

    but the code work under asp ?

    I try to put like that

    <%@ Language=VBScript %>
    <%
    Dim Computer
    Dim Group

    Set Computer = GetObject("WinNT://" & "machinename")
    Computer.Filter = Array("Group")
    For Each Group in Computer
    Response.Write Group.Name
    Next
    %>

    Without any success.

    The code work fine under VB in command environnment...but what about
    ASP ?

    THX
    , Jan 25, 2006
    #3
  4. dNagel Guest

    The article I pulled it from (I gave the link) was fo ASP...

    D.


    wrote:
    > Thanks for you help,
    >
    > but the code work under asp ?
    >
    > I try to put like that
    >
    > <%@ Language=VBScript %>
    > <%
    > Dim Computer
    > Dim Group
    >
    > Set Computer = GetObject("WinNT://" & "machinename")
    > Computer.Filter = Array("Group")
    > For Each Group in Computer
    > Response.Write Group.Name
    > Next
    > %>
    >
    > Without any success.
    >
    > The code work fine under VB in command environnment...but what about
    > ASP ?
    >
    > THX
    >
    dNagel, Jan 25, 2006
    #4
  5. dNagel Guest

    The only thin I can think of is that your environment is not set up properly ...
    It's got to be a permissions issue, either in the form of the user you're using
    does not have high enougn domain access rights, or there may be some other
    domain level settings that prevent you from accessing this information.

    Go over to msdn.microsoft.com and search for ADSI or ADAM.

    D.



    dNagel wrote:
    > The article I pulled it from (I gave the link) was fo ASP...
    >
    > D.
    >
    >
    > wrote:
    >
    >> Thanks for you help,
    >>
    >> but the code work under asp ?
    >>
    >> I try to put like that
    >>
    >> <%@ Language=VBScript %>
    >> <%
    >> Dim Computer
    >> Dim Group
    >>
    >> Set Computer = GetObject("WinNT://" & "machinename")
    >> Computer.Filter = Array("Group")
    >> For Each Group in Computer
    >> Response.Write Group.Name
    >> Next
    >> %>
    >>
    >> Without any success.
    >>
    >> The code work fine under VB in command environnment...but what about
    >> ASP ?
    >>
    >> THX
    >>
    dNagel, Jan 25, 2006
    #5
  6. Guest

    I launch it on with the domain admin on the DC (test env).

    I try to remove the anonymous access to the folder where is the test
    file but without any success...

    I would search around a security issue....
    , Jan 27, 2006
    #6
    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. =?Utf-8?B?QW5kZXJzQmo=?=

    List members of a active directory group

    =?Utf-8?B?QW5kZXJzQmo=?=, Jun 10, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    584
    =?Utf-8?B?QW5kZXJzQmo=?=
    Jun 10, 2004
  2. zieg
    Replies:
    0
    Views:
    2,016
  3. moi
    Replies:
    2
    Views:
    2,847
    Marc Scheuner
    Apr 22, 2006
  4. Replies:
    0
    Views:
    355
  5. Replies:
    7
    Views:
    545
    Tim Golden
    Feb 16, 2007
Loading...

Share This Page