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

DirectoryServices problem enumerating properties

I'm trying to write a custom installer for a web site project of mine
because the silly default WebInstaller projects don't know how to install
to anything other than the default web site... (if this is wrong, please
tell me!) So I'm trying to enumerate the web sites that exist on the local
machine with DirectoryServices:

DirectoryEntry root = new DirectoryEntry("IIS://localhost/W3SVC");

foreach(DirectoryEntry de in root.Children)
{
foreach(string pName in de.Properties.PropertyNames)
{
Console.WriteLine(
string.Format("{0} = {1}",
pName,
de.Properties[pName].Value
)
);
}
}

This works great on my development machine, but when I move to a machine
that I would actually install on (Small Business Server 2003), I get an
"NotSupportedException" with a message of "The directory cannot report the
number of properties".

Anyone know why I'm getting this exception? Anything I can do about it?
Is there any other way to reliably enumerate web sites?

-mdb
Feb 10 '06 #1
0 1016

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

Similar topics

0
by: Ken | last post by:
Hi, We have a component that we've used successfully under W2000 to create virtual directories on an IIS 5.0 web server. We're in the process of upgrading to W2003 and I'm now encountering an...
0
by: kovac | last post by:
The System.directoryservices.dll has an error, and this error was described in http://support.microsoft.com/default.aspx?scid=kb;en-us;839424 At the moment we have Framework version v1.0.3705 and...
3
by: Sean | last post by:
I figured I'd start this post on the .NET general forum instead of the ADSI forum but feel free to nudge me along if I am looking in the wrong place. I am working with System.DirectoryServices...
4
by: Lyn | last post by:
Hi, This question may seem a bit academic... To learn more about Access VBA, I have been enumerating the properties of various form controls. This was mostly successful and I have learned a lot...
1
by: Stephanie Stowe | last post by:
Hi. I am trying to read information out of the IIS metabase (v5.1). Observe the following code: using System; using System.DirectoryServices; using System.Reflection; namespace ADSI1 {...
5
by: Keith Jakobs, MCP | last post by:
Hi All.... I'm having a HECK of a time connecting to Active Directory using VB in Visual Studio.NET 2003. Can anyone PLEASE help me? All I am trying to do is list the current members of our...
0
by: RSH | last post by:
I am using System.DirectoryServices to query our AD in order to get information about users. I am having problems understanding how to get at the Username and the Email address (to begin with) ...
6
by: bugnthecode | last post by:
Hi, I'm building a small desktop app in VS Std 2005 with C# and .net 2.0. I've managed to get the code together to query the ldap my company has, but every time I attempt to access a specific...
5
by: Peter Bradley | last post by:
I'm trying to use System.DirectoryServices to update Active Directory from a Web Service. When I try to commit the changes, I get the following error message: "A constraint violation occurred....
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.