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

Obtain IIS Children

I have a problem to obtain the children in IIS when I create a folder
directly in c:\inetput\wwwroot\*. If a create with Visual Studio it's OK.
This is the code I use to obtain the object IIS.

Dim objAdmnIIS As System.DirectoryServices.DirectoryEntry
Dim colctRepert As String()
Dim objRpertEnf As System.DirectoryServices.DirectoryEntry
Dim objRpertParen As System.DirectoryServices.DirectoryEntry
Dim strNomRpert As String
Dim blnRpertTrouv As Boolean

objAdmnIIS = New System.DirectoryServices.DirectoryEntry( _
String.Format("IIS://{0}/W3SVC/{1}/Root{2}", _
"Serveur", _
"1"_
String.Empty))

objAdmnIIS.RefreshCache()

objRpertParen = objAdmnIIS

If Not colctRepert Is Nothing Then
For Each strNomRpert In colctRepert
blnRpertTrouv = False
For Each objRpertEnf In objRpertParen.Children
If
objRpertEnf.Name.ToUpper().Equals(strNomRpert.ToUp per()) Then
objRpertParen = objRpertEnf
blnRpertTrouv = True
Exit For
End If
Next
Next
End If

Thank You
Jun 4 '07 #1
1 1287
Hello Martin,

the IIS metabase only contains entries for websites and virtual directories.
But if you create a new folder under InetPub\wwwroot, I wouldn't expect it
to show up in the metabase. For IIS, this is only a simple subdirectory
without any configuration data on it. Now, when you configure a
web-application on the subfolder, an entry would be created in the metabase.

Best regards,
Henning Krause

"MartinT" <Ma*****@community.nospamwrote in message
news:FC**********************************@microsof t.com...
>I have a problem to obtain the children in IIS when I create a folder
directly in c:\inetput\wwwroot\*. If a create with Visual Studio it's OK.
This is the code I use to obtain the object IIS.

Dim objAdmnIIS As System.DirectoryServices.DirectoryEntry
Dim colctRepert As String()
Dim objRpertEnf As System.DirectoryServices.DirectoryEntry
Dim objRpertParen As System.DirectoryServices.DirectoryEntry
Dim strNomRpert As String
Dim blnRpertTrouv As Boolean

objAdmnIIS = New System.DirectoryServices.DirectoryEntry( _
String.Format("IIS://{0}/W3SVC/{1}/Root{2}", _
"Serveur", _
"1"_
String.Empty))

objAdmnIIS.RefreshCache()

objRpertParen = objAdmnIIS

If Not colctRepert Is Nothing Then
For Each strNomRpert In colctRepert
blnRpertTrouv = False
For Each objRpertEnf In objRpertParen.Children
If
objRpertEnf.Name.ToUpper().Equals(strNomRpert.ToUp per()) Then
objRpertParen = objRpertEnf
blnRpertTrouv = True
Exit For
End If
Next
Next
End If

Thank You
Jun 4 '07 #2

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

Similar topics

5
by: Jack | last post by:
Hi, I have a query result as follows: State ScSortOrder SlCity SclAdd SlPhone SlKey SlHdFNm SlHdLNm SlHdSortOrder SlHdPhNo NY 1 Albany 200 Dee Drive ...
1
by: Todd Cary | last post by:
In my previous post, I stated that some JavaScript I inherited does not work in Firefox but does work in IE 6 . I have now isolated a line where it fails in Firefox; the line with the property of...
6
by: Luke Dalessandro | last post by:
I'm not sure if this is the correct forum for platform specific (Mozilla/Firefox) javascript problems, so just shout and point me to the correct newsgroup if I'm being bad. Here's the deal... ...
0
by: Walt Borders | last post by:
Hi, My problem: Merging two datasets deletes parent elements, preserves all children. I've created two dataSets. Each use the same schema, parent-child nested tables. The first dataSet is...
1
by: Marius Groenendijk | last post by:
Dear Group, I have a MDI with children which may be editing data. If a MDI child closes its Closing handler asks a question 'exit w/out saving?'. On closing the MDI its pops a question 'Exit...
2
by: Pucca | last post by:
I'm building a treeview and a list view. I need to know when I reached the end of the tree nodes, which means that node or directory entry has no children. Is there a property or method in...
2
by: Yarik | last post by:
Hello, I am not sure the subject of my post adequately describes the problem I am trying to solve, so I think a specific example would be helpful. Let's say there are XML descriptions of...
3
by: Andrej Pavlovic | last post by:
Hi, Please look at the following HTML snippet: <body> some text <p>more text</p> even more text </body>
9
MrPickle
by: MrPickle | last post by:
I have a structure like so: struct node { float x, y, z; std::vector<node> children; }; and I want to loop through all the node's children, then all the children's children then all the...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
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
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
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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.