473,387 Members | 1,882 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,387 software developers and data experts.

Active Directory Programming in C#?

I need to retrieve and set information in Active Directory in a new project
that I'll be working on. I went to Amazon.com to look for a good book on
this subject but found books on this subject all using C++. Can I make ADSI
and LDAP API calls using C#? Can someone recommend a good book for this
subject with C# as sample code?

Thanks,
Alpha
Dec 19 '05 #1
2 8111
You're in luck. System.DirectoryServices does exactly that (You have to add
it as a reference in VS2003, not sure about 2005).
Check out:
http://msdn.microsoft.com/library/de...ryservices.asp

Snip from the top of the link above:
The System.DirectoryServices namespace provides easy access to Active
Directory from managed code. The namespace contains two component classes,
DirectoryEntry and DirectorySearcher, which use the Active Directory
Services Interfaces (ADSI) technology. ADSI is the set of interfaces that
Microsoft provides as a flexible tool for working with a variety of network
providers. ADSI gives the administrator the ability to locate and manage
resources on a network with relative ease, regardless of the network's size.

The classes in this namespace can be used with any of the Active Directory
service providers. The current providers are: Internet Information Services
(IIS), Lightweight Directory Access Protocol (LDAP), Novell NetWare
Directory Service (NDS), and WinNT.

ADSI is a programmatic interface for Microsoft Active Directory that enables
your applications to interact with diverse directories on a network, using a
single interface. Using ADSI, you can create applications that can perform
common tasks, such as backing up databases, accessing printers, and
administering user accounts.

"Alpha" <Al***@discussions.microsoft.com> wrote in message
news:7D**********************************@microsof t.com...
I need to retrieve and set information in Active Directory in a new project
that I'll be working on. I went to Amazon.com to look for a good book on
this subject but found books on this subject all using C++. Can I make
ADSI
and LDAP API calls using C#? Can someone recommend a good book for this
subject with C# as sample code?

Thanks,
Alpha

Dec 19 '05 #2
Thanks. I guess the answer to my question is yes, that I can use ADSI with
C# code.

"Craig S" wrote:
You're in luck. System.DirectoryServices does exactly that (You have to add
it as a reference in VS2003, not sure about 2005).
Check out:
http://msdn.microsoft.com/library/de...ryservices.asp

Snip from the top of the link above:
The System.DirectoryServices namespace provides easy access to Active
Directory from managed code. The namespace contains two component classes,
DirectoryEntry and DirectorySearcher, which use the Active Directory
Services Interfaces (ADSI) technology. ADSI is the set of interfaces that
Microsoft provides as a flexible tool for working with a variety of network
providers. ADSI gives the administrator the ability to locate and manage
resources on a network with relative ease, regardless of the network's size.

The classes in this namespace can be used with any of the Active Directory
service providers. The current providers are: Internet Information Services
(IIS), Lightweight Directory Access Protocol (LDAP), Novell NetWare
Directory Service (NDS), and WinNT.

ADSI is a programmatic interface for Microsoft Active Directory that enables
your applications to interact with diverse directories on a network, using a
single interface. Using ADSI, you can create applications that can perform
common tasks, such as backing up databases, accessing printers, and
administering user accounts.

"Alpha" <Al***@discussions.microsoft.com> wrote in message
news:7D**********************************@microsof t.com...
I need to retrieve and set information in Active Directory in a new project
that I'll be working on. I went to Amazon.com to look for a good book on
this subject but found books on this subject all using C++. Can I make
ADSI
and LDAP API calls using C#? Can someone recommend a good book for this
subject with C# as sample code?

Thanks,
Alpha


Dec 19 '05 #3

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

Similar topics

9
by: Mario Rodriguez | last post by:
Hi people. I have a problem adding users to Win2003 active directory programatically. When I execute my app throws the following exception: .................The specified directory service...
0
by: Ciccio | last post by:
Hi I'm new to active directory programming. From an asp.net application that uses AD I got an excepion of type: System.Runtime.InteropServices­.COMException (0x8000500C): The Active Directory...
3
by: Gentian Hila | last post by:
Hello there, I was wondering if any one knows some good source, book, or even MSDN resurce (I found something there, but seems to be very little) that instructs how to create in VB.NET programs...
0
by: RTT | last post by:
here is my current situation. I develop a program on my computer's localhost. From there i contact Active directory succesfull using a connectionstring like:...
1
by: Arne Tiedemann | last post by:
Hello NG, I'm new in programming VB.NET and I'll create a Project to read and change Active Directory Users, Groups, and Organisational Units. I test with VisualStudio 2003 but wenn i access Users...
2
by: Jim in Arizona | last post by:
My goal, somehow, is to populate a dropdownlist with all the user names in active directory. I don't even know where to begin, really. I added a reference to System.DirectoryServices so I could...
4
by: IainM | last post by:
How can I enumerate AD objects (only in a given OU, not sub OUs) using the DirectoryEntry object? Let me know of this is the wrong forum for this question. Thanks, Iain
18
by: Arthur | last post by:
Hi All, I would like to get the name of the user given their networkID, is this something Active Directory would be useful for?(For intranet users) If so, can you please point me to some sample...
5
by: Kaamp | last post by:
I am trying to create a simple AD search page where any of my co workers can input and name and get in return phone numbers. I don't need anything fancy, since most of the internal site has already...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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...

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.