VS.Net Server Explorer Add-In Install Problem

hismightiness

Member
Joined
Jun 23, 2004
Messages
5
Location
Florida
Programming Experience
1-3
I am running a Win2kPro Machine with VS.Net 2003 (ver 7.1.3088) Enterprise Edition. I am trying to develop something using the Active Directory as a data source. Well, I found a neat little download named "Microsoft Visual Studio.NET Server Explorer Extensions for Active Directory".

Supposedly, this tool will allow you to query the Active Directory just like any other data source, and then you can drag and drop the connection code onto your page. This would cut my development time significantly! Well, everytime I go to install it, I get a message "Server Explorer Extensions for Active Directory can only be run on Visual Studio.Net". Then, the installer then prompts me to close it. The tool is made for VS.Net version 7.0. Is it not compatible with my version?

I have been unable to come up with any additional info from the Microsoft site so far. The link to the tool is:

http://www.microsoft.com/downloads/details.aspx?FamilyId=C82D7AB5-40A5-4DD4-9595-53A79FF2C5BC&displaylang=en

Can anyone give me any input on how I can get this to install?
 

Mykre

Active member
Joined
Jun 14, 2004
Messages
28
Location
Australia
Programming Experience
3-5
What are you trying to do, This might help us to provide an answer.

Are you trying to access the directory by code, or is it just to manage the directory like an admin would.

Mykre
 

hismightiness

Member
Joined
Jun 23, 2004
Messages
5
Location
Florida
Programming Experience
1-3
I am trying to access the Directory via code. We are going to perform a couple admin tasks later on (like allowing the user to change thier own password), but for right now, I am building an intranet area to show the users, departments, extensions, etc.

The important thing is, I do not want too much of the code to be static. If the admin decides to change the way they enter the department names, I don't want to have to edit each area that I use that particular variable. We currently use a VBScript version of this, but DotNet completely changes the way we access the AD.
 
Last edited:

Mykre

Active member
Joined
Jun 14, 2004
Messages
28
Location
Australia
Programming Experience
3-5
Here is a small snippit that reads all of the computers from the AD, It was taken from the common tasks on the quickstart guides on GotdotNET.com

VB.NET:
 [size=2][color=#0000ff]

Public[/color][/size][size=2] [/size][size=2][color=#0000ff]Module[/color][/size][size=2] ReadAD

[/size][size=2][color=#0000ff]Public[/color][/size][size=2] [/size][size=2][color=#0000ff]Sub[/color][/size][size=2] main()

[/size][size=2][color=#008000]'This will only work if you are connected to an active directory. 

[/color][/size][size=2][/size][size=2][color=#008000]'Add a reference to system.directoryservices. Replace NetworkName with your

[/color][/size][size=2][/size][size=2][color=#008000]'network name.

[/color][/size][size=2][/size][size=2][color=#0000ff]Dim[/color][/size][size=2] de [/size][size=2][color=#0000ff]As[/color][/size][size=2] [/size][size=2][color=#0000ff]New[/color][/size][size=2] System.DirectoryServices.DirectoryEntry("LDAP://NetworkName")

[/size][size=2][color=#0000ff]Dim[/color][/size][size=2] ds [/size][size=2][color=#0000ff]As[/color][/size][size=2] [/size][size=2][color=#0000ff]New[/color][/size][size=2] System.DirectoryServices.DirectorySearcher(de)

[/size][size=2][color=#0000ff]Dim[/color][/size][size=2] r [/size][size=2][color=#0000ff]As[/color][/size][size=2] System.DirectoryServices.SearchResult

ds.Filter = "(objectClass=computer)"

[/size][size=2][color=#0000ff]Try

[/color][/size][size=2][/size][size=2][color=#0000ff]For[/color][/size][size=2] [/size][size=2][color=#0000ff]Each[/color][/size][size=2] r [/size][size=2][color=#0000ff]In[/color][/size][size=2] ds.FindAll

[/size][size=2][color=#0000ff]Dim[/color][/size][size=2] s [/size][size=2][color=#0000ff]As[/color][/size][size=2] [/size][size=2][color=#0000ff]String

[/color][/size][size=2]Console.WriteLine(r.GetDirectoryEntry.Name.ToString)

[/size][size=2][color=#0000ff]Next

[/color][/size][size=2][/size][size=2][color=#0000ff]Catch[/color][/size][size=2] e [/size][size=2][color=#0000ff]As[/color][/size][size=2] Exception

Console.WriteLine(e.ToString)

[/size][size=2][color=#0000ff]End[/color][/size][size=2] [/size][size=2][color=#0000ff]Try

[/color][/size][size=2]Console.ReadLine()

[/size][size=2][color=#0000ff]End[/color][/size][size=2] [/size][size=2][color=#0000ff]Sub

End[/color][/size][size=2] [/size][size=2][color=#0000ff]Module

[/color][/size]

The libraries you need to look into are in the system.directoryservices namepace.

Mykre
 
Top Bottom