List Domain Computers

L

Lloyd Taylor

Hello,

I have a simple bit of code which I have found in the forums which lists all
the computer(s) in a domain.

The code is: DirectoryEntry domainEntry = new
DirectoryEntry("WinNT://DOMAIN");
domainEntry.Children.SchemaFilter.Add("computer");
foreach(DirectoryEntry server in domainEntry.Children)
computers.Add(server.Name);

(where computers is an ArrayList)
When executed from within a console application I get the expected results
however I want to show
the list in a drop down list on an asp.net page.

When I put the code in my asp.net page, the dropdown list box always remains
empty.
Is this a permissions problem? Any suggestion how I can remedy this problem
would be gratefully appreciated.

Regards
Lloyd
 

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,225
Members
46,815
Latest member
treekmostly22

Latest Threads

Top