ADSI with c# (asp.net) questions and help

Hi there,

I wonder if anybody can help?

I have been trying to looki at implementing ADSI with c# (asp.net) but it has been very hard to find any documentation to the available object, methods, properties etc.

Tried search for a book but nothing withc#,

Does anybody know where i can find some documention or help with ADSI ... specifically with c#

Also, i noticed ADSI uses COM (am I right?), so is ADSI an old technology that is going to be replaced (or already replaced) with a new technology??

Is ADSI installed autoamtically with Windows 2003 Server (IIS) and asp.net?

My main aim with adsi is to be able to create Websites, ftp accounts, Email accounts (which i have only found MS Exchange to support, maybe I am wrong??)

Any help or information with regards to any of the above woudl be really appreciated

Thanks in advance

Ian
ianinspainAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

muzzy2003Commented:
You use ADSI via the System.DirectoryServices namespace. There is an overview at:

http://www.15seconds.com/issue/020730.htm
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
paresh_vsCommented:
Hi,
  Try following links also. Hope it helps you.

http://www.troobloo.com/tech/asp.90.shtml
http://www.123aspx.com/redir.aspx?res=30841

Regards
Paresh
0
ianinspainAuthor Commented:
Thanks everyone, actually I managed to pickup an ADSI help file, which is very VB /VBSCRIPT types

Anyone know an easy way to use this and convert to .NET classes.... is there an easy way??

I wish somebody would produce a c# / ADSI book..

ADSI books seem very thin on the ground..

Ian
0
muzzy2003Commented:
That is exactly what the System.DirectoryServices namespace is all about. Here is an example that adds a user to a group:

DirectoryEntry dom = new DirectoryEntry();
DirectoryEntry group = dom.Children.Find("CN=Consulting");

// Add a single user to a group;
DirectoryEntry usr = group.Children.Find("CN=New User");

// To add multiple users to a group use
//group.Properties["member"].AddRange(new string[] {"userDN1","userDN2"});

//To add the user's distinguished name to the member property
//on the group object, use the Add method.
group.Properties["member"].Add(usr.Properties["distinguishedName"].Value);

//Commit the changes to the directory.
group.CommitChanges();

As an alternative, search MSDN for "Using COM Interop to Access ADSI".
0
ianinspainAuthor Commented:
cheers guys! points split,.

Best regards

Ian
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
C#

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.