473,406 Members | 2,698 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

List users and groups from ActiveDirectory in ASP.NET page?

TK
How can I show a list of OS users and groups in an ASP.NET page?
Is there MSDN or SDK articles?

please help.
TK

Nov 18 '05 #1
2 2401
the System.Directoryservices namespace is the one you are after.

There is a whole sheaf od stuff on it on MSDN adn a couple of good articles
on www.4guysfromrolla.com
hope this helps
M

"TK" <tk****@nospam.emotionalbits.com> wrote in message
news:uG**************@TK2MSFTNGP12.phx.gbl...
How can I show a list of OS users and groups in an ASP.NET page?
Is there MSDN or SDK articles?

please help.
TK

Nov 18 '05 #2
TK
Thank you Martin.
Today I've learned about System.DirectoryServices as you pointed, and I
succeeded to get a list of AD objects in //domain/Users. My current code is
as following.

using System;
using System.Security;
using System.DirectoryServices;

namespace users
{
public class listUsers
{
public static int Main()
{
DirectoryEntry entries =
new DirectoryEntry("LDAP://CN=Users,DC=mydom,DC=local");

foreach(DirectoryEntry ent in entries.Children)
{
Console.WriteLine("{0} {1}", ent.Name, ent.Path);
}
return 0;
}
}
}

Above program show me a complete list of users and groups which are exist in
//mydom.local/Users. But I still haven't understood clearly. I want to
distinguish group or user object from the entries.Children list.
How can I do it? What the things I should learn about?

TK

"Martin c" <ma****@nospam.com> wrote in message
news:OT**************@TK2MSFTNGP09.phx.gbl...
the System.Directoryservices namespace is the one you are after.

There is a whole sheaf od stuff on it on MSDN adn a couple of good articles on www.4guysfromrolla.com
hope this helps
M

"TK" <tk****@nospam.emotionalbits.com> wrote in message
news:uG**************@TK2MSFTNGP12.phx.gbl...
How can I show a list of OS users and groups in an ASP.NET page?
Is there MSDN or SDK articles?

please help.
TK



Nov 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Guy Hocking | last post by:
Hi there, I am having a few problems compiling a list box that is conditional on what is selected in another list box. What i need is a List box (lstArea) that displays one thing when the List...
1
by: cyshao | last post by:
How to add system users and groups by programming? Thanks:-)
2
by: Brian Henry | last post by:
I am working on a internal intranet site, and i need to make a permissions page, all the account authorization is done through AD to let them see the intranet site.. now, the permissions page i...
8
by: Galina | last post by:
Hello I have 6 dependent list boxes on my ASP page:  Faculty;  Lecturer;  Course;  Course occurrence;  Group;  Week commencing date. When faculty is selected, lists of lecturers and...
2
by: TK | last post by:
How can I show a list of OS users and groups in an ASP.NET page? Is there MSDN or SDK articles? please help. TK
1
by: tangus via DotNetMonster.com | last post by:
Hello all, I'm really struggling with getting some Active Directory code to work in ASP.NET. Can you please provide assistance? I am executing the following code: Dim enTry As DirectoryEntry =...
4
by: Andy M | last post by:
ALERT There is a person by the name of Mike Cox who's trying to turn this mailing list into a Big-8 newsgroup. Many of you know that this and most of the other postresql mailing lists are...
10
by: Jeff Williams | last post by:
How can I get a list of the Groups both Local and Domain groups a User belongs to.
0
by: Rainer Standke | last post by:
Hello, I want to get a list of groups a user is in via System.DirectoryServices. This could be done with this code: DirectoryEntry obEntry = new DirectoryEntry("LDAP://DC=ini-...
2
by: rote | last post by:
My sceanrio is this on an asp.net 2.0 freamework. I want to use any of the data controls e.g Gridview,DetailView etc.. But i want some buttons e.g update,edit save etc to be enable or disabled...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.