For Programmers: Free Programming Magazines  


Home > Archive > ASP > January 2006 > Use Active Directory Group in a dropdown form control









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Use Active Directory Group in a dropdown form control
toomanymessi@gmail.com

2006-01-25, 3:56 am

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

2006-01-25, 3:56 am

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



toomanymessi@gmail.com 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
>

toomanymessi@gmail.com

2006-01-25, 3:56 am

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

2006-01-25, 6:55 pm

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

D.


toomanymessi@gmail.com 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

2006-01-25, 6:55 pm

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:[color=darkred]
> The article I pulled it from (I gave the link) was fo ASP...
>
> D.
>
>
> toomanymessi@gmail.com wrote:
>
toomanymessi@gmail.com

2006-01-27, 3:55 am

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....

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com