471,350 Members | 1,930 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,350 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 8018
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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

9 posts views Thread by Mario Rodriguez | last post: by
reply views Thread by Ciccio | last post: by
3 posts views Thread by Gentian Hila | last post: by
1 post views Thread by Arne Tiedemann | last post: by
2 posts views Thread by Jim in Arizona | last post: by
4 posts views Thread by IainM | last post: by
5 posts views Thread by Kaamp | last post: by
reply views Thread by XIAOLAOHU | last post: by

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.