Hey all,

I'm trying to walk my first steps in .NET Visual Basic and I want to
create a Web App to provide our people an interface to run some common
tasks (since they won't follow procedures....)

Is there someone who could help me with a simple sample app in ASP.NET
that queries the AD and returns the list of users in a dropdownbox? More
I don't need, the rest I do it myself

I wrote some code, but running it from my WS returns me an error teeling
me hey cannot contact the domain...whenever it hits the for next
loop...My security is OK, I followed Q329986...I choose for methode 1
and changed the username for anonymous acces to a domain user

This is the code I used

PLEASE Help

        Dim entry As New
DirectoryServices.DirectoryEntry("LDAP://ou=tele_dom
users,DC=PROD,DC=TELENET,DC=BE")
        Dim mySearcher As New
System.DirectoryServices.DirectorySearcher(entry)
        Dim result As System.DirectoryServices.SearchResult
        Dim oValue As New ArrayList
        For Each result In mySearcher.FindAll()
 
oValue.Add(Microsoft.VisualBasic.Right(result.GetDirectoryEntry().Name,l
en(result.GetDirectoryEntry().Name) - 3))
        Next

        User1.DataSource = oValue
        User1.Visible = True


Thx
Marc
*************************************************************

Dit e-mail bericht inclusief eventuele ingesloten bestanden kan informatie bevatten 
die vertrouwelijk is en/of beschermd door intellectuele eigendomsrechten. Dit bericht 
is uitsluitend bestemd voor de geadresseerde(n). Elk gebruik van de informatie vervat 
in dit bericht (waaronder de volledige of gedeeltelijke reproductie of verspreiding 
onder elke vorm) door andere personen dan de geadresseerde(n) is verboden. Indien u 
dit bericht per vergissing heeft ontvangen, gelieve de afzender hiervan te verwittigen 
en dit bericht te verwijderen. 

This e-mail and any attachment thereto may contain information which is confidential 
and/or protected by intellectual property rights and are intended for the sole use of 
the addressees. Any use of the information contained herein (including but not limited 
to total or partial reproduction or distribution in any form) by other persons than 
the addressees is prohibited. If you have received this e-mail in error, please notify 
the sender and delete its contents. 

*************************************************************
List info   : http://www.activedir.org/mail_list.htm
List FAQ    : http://www.activedir.org/list_faq.htm
List archive: http://www.mail-archive.com/activedir%40mail.activedir.org/

Reply via email to