Getobject C# Equevlent

A

]-[aTc]-[

I'm trying to add users to active directing using asp.net forms. All the
example on the web are for VB and using the VB method GetObject. Is there a
C# sharp equivalent of GetObject or can someone point me to an example of
how to do this in C#.
Thanks
--Mike
 
K

Kyril Magnos

Wait, you found examples of how to do this using VB.NET or VBScript? If I
remember correctly, those examples were using old ASP/VBScript and not
VB.NET and are severely outdated.

Anyhow, there is no equivalent for GetObject() (and it's a good thing too...
VB let's you get away with late-binding objects. C# doesn't) in C#.

What you need to do is look into using the System.Enterprise namespace.

I did a quick search and found a few links for you to look at. I hope they
will be of assistance to you.

http://www.dotnet247.com/247reference/msgs/18/92050.aspx

http://support.microsoft.com/default.aspx?scid=kb;EN-US;306273 (adds a user
to the local system, but should be able to be adapted to AD)

http://www.codeproject.com/dotnet/addnewuser.asp

--
HTH

Kyril Magnos

Question of the day:
What is Mono?
A) Disease where the lymph nodes become swollen.
B) A single sound
C) A synonym for one
D) A port of .NET meant to royally irritate MSFT
E) All of the above.

| I'm trying to add users to active directing using asp.net forms. All the
| example on the web are for VB and using the VB method GetObject. Is there
a
| C# sharp equivalent of GetObject or can someone point me to an example of
| how to do this in C#.
| Thanks
| --Mike
|
|
 
C

Craig Deelsnyder

VB let's you get away with late-binding objects. C# doesn't) in C#.

Actually late-binding is possible in alot of places (C# and VB.NET). You
can load any (valid) class given its name as a string, for example.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,022
Latest member
MaybelleMa

Latest Threads

Top