473,785 Members | 2,266 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2441
the System.Director yservices 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.c om> wrote in message
news:uG******** ******@TK2MSFTN GP12.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.Director yServices 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.Director yServices;

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

foreach(Directo ryEntry ent in entries.Childre n)
{
Console.WriteLi ne("{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.Childre n list.
How can I do it? What the things I should learn about?

TK

"Martin c" <ma****@nospam. com> wrote in message
news:OT******** ******@TK2MSFTN GP09.phx.gbl...
the System.Director yservices 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.c om> wrote in message
news:uG******** ******@TK2MSFTN GP12.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
1882
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 Box (lstRegion) is selected East or West. Basically the areas will change when East or West is selected in lstRegion. The data comes from an SQL Server view, and my current non-working code is as follows, my syntax in the SQL statement is...
1
1112
by: cyshao | last post by:
How to add system users and groups by programming? Thanks:-)
2
1987
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 need a list of users in AD... is this possible to get a list of user names from ad? (the server is on the domain that hosts the intranet site)
8
2585
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 courses are populated. When course is selected, lists of occurrences, groups and
2
426
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
3895
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 = New DirectoryEntry("LDAP://domain") Dim mySearcher As New DirectorySearcher(enTry) Dim resEnt As SearchResult mySearcher.Filter = ("(objectClass=*)") mySearcher.SearchScope = SearchScope.Subtree
4
2547
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 already gated to Google Groups and a small number of private news servers. If Mike Cox succeeds, this list will be available as a newsgroup on a great many more ISPs and NSPs, which could be a good or a bad thing. For one, e-mail addresses on this
10
26814
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
2095
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- graphicsnet,DC=org"); DirectorySearcher srch = new DirectorySearcher(obEntry, "(sAMAccountName=" + strUser + ")"); SearchResult res = srch.FindOne(); if (null != res)
2
2762
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 based on if they belong to some security groups in active directory. I'm looking for the best options for this because i want to store those security groups somewhere and then check for the user against those security groups for their authorisation...
0
9647
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10162
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9959
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8988
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7509
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6744
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5396
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5528
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2893
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.