473,397 Members | 2,116 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,397 software developers and data experts.

A problem about DirectoryEntry.Properties

I can't list the key-value pairs at runtime.The pairs list can not be
retrieved.
below is what I wrote
DirectoryEntry nodeAdmin = de.Children.Find("IISAdmin","IIsWebVirtualDir")
// ,nodePrinters = de.Children.Find("Printers","IIsWebVirtualDir");
// IEnumerator enA = nodeAdmin.Properties.PropertyNames.GetEnumerator() ;
// System.DirectoryServices.PropertyCollection m_pc =
nodeAdmin.Properties;
// IEnumerator m_AK = m_pc.PropertyNames.GetEnumerator();
// IEnumerator m_AV = m_pc.Values.GetEnumerator();
// int i=0;
// while(i<m_pc.PropertyNames.Count)
// { m_AK.MoveNext();
// i++;
// this.textBox1.Text+=m_AK.Current.ToString()+"\r\n" ;
//
//
//
// }
Nov 15 '05 #1
3 5471
>I can't list the key-value pairs at runtime.The pairs list can not be
retrieved.


What happens? Do you get an error? If so, what is it? If not - do you
just not get any properties back? Maybe there aren't any properties
set.....

Marc
================================================== ==============
Marc Scheuner May The Source Be With You!
Bern, Switzerland m.scheuner(at)inova.ch
Nov 15 '05 #2
There are properties set.
And there is an exception tells it can't list the properties because the
number of properties can not be counted.
And one more thing.I use the method DiretoryEntry.Invoke
to call the IIsWebServer.Stop method, there is no parameter in the
prototype of IIsWebServer.Stop,what should I initiate the second
parameter of Invoke method.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 15 '05 #3
Count is not returned by the IIS ADSI provider, use foreach to enumerate the collection.
Willy.

"wang.qiang" <wa********@shangxin.com> wrote in message news:eN**************@TK2MSFTNGP11.phx.gbl...
I can't list the key-value pairs at runtime.The pairs list can not be
retrieved.
below is what I wrote
DirectoryEntry nodeAdmin = de.Children.Find("IISAdmin","IIsWebVirtualDir")
// ,nodePrinters = de.Children.Find("Printers","IIsWebVirtualDir");
// IEnumerator enA = nodeAdmin.Properties.PropertyNames.GetEnumerator() ;
// System.DirectoryServices.PropertyCollection m_pc =
nodeAdmin.Properties;
// IEnumerator m_AK = m_pc.PropertyNames.GetEnumerator();
// IEnumerator m_AV = m_pc.Values.GetEnumerator();
// int i=0;
// while(i<m_pc.PropertyNames.Count)
// { m_AK.MoveNext();
// i++;
// this.textBox1.Text+=m_AK.Current.ToString()+"\r\n" ;
//
//
//
// }

Nov 15 '05 #4

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

Similar topics

2
by: Petra | last post by:
Hi I have problem reading the userPassword - Property from an Entry with the person-Schema using Microsoft Dotnet. I use DirectoryServices library and LDAP in my class. The code I used is as...
12
by: hykim | last post by:
Hello, everyone. according to MSDN, there is any constructor of System.DirectoryServices.SearchResultCollection Class. if I implement DirectorySearcher.FindAll() method by myself, then how can I...
2
by: Jessica | last post by:
When I create a single LDAP ActiveDirectory user and use DirectoryEntry.Invoke("SetPassword"...), the user is created and the password is set with no problems. However, when I try to add more...
3
by: Dinçer | last post by:
Hi, I am trying to get user data (email data actually) from Active Directory. What I exactly want to do is, getting the email address according to username from the domain. For example, when I...
6
by: huzz | last post by:
How do i create a directory entry to access a user's details such as their email address. Here are the object structure. domain.co.uk | |Computer Services - Type (OU) | |Cliff Saran - Type...
0
by: Ed Morrison | last post by:
I am trying to change the userPassword property of an Active Directory user account, but it does not work. I do not receive an error. The new password is not valid, but the old password still...
0
by: whosyodaddy1019 | last post by:
In my hunt to change the "User Cannot Change password" attribute in active directory so that its unchecked, I read that it is easier to use WinNT instead of LDAP. But im having issues getting it to...
1
by: Magnus R | last post by:
In VB.Net I'm trying to find out the names of what Administrative Groups exist by querying Active Directory. The problem is when I try and query the children of the key LDAP://CN=Administrative...
5
by: Michael Howes | last post by:
I'm writing a utility to manage a machines *local* accounts in c# I am getting all the users in a specific Group just fine but when I want to get some of the information on each user from their...
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.