467,890 Members | 1,754 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,890 developers. It's quick & easy.

Reading the IIS metabase to list all virtual servers...

Stu
Hi,

I am writing a windows forms app that needs to list all the virtual servers
and their respective log file paths. The IIS6 metabse is nice and easy as it
is XML.

Is there any way to reading these details from the IIS5 metabase - which
appears to be a binary format?

Thanks in advance,

Stu
Nov 21 '05 #1
  • viewed: 3852
Share:
2 Replies
Hi,

One option is to use System.DirectoryServices namespace types. Here is a
sample:

-- Code Start --
DirectoryEntry root = new DirectoryEntry (@"IIS://localhost/W3SVC");
foreach (DirectoryEntry c in root.Children)
{
if (c.Properties["KeyType"][0].ToString() == "IIsWebServer")
Console.WriteLine (c.Properties["LogFileDirectory"][0].ToString());
}
-- Cod End --

I hope this is what you are looking for.

"Stu" <s.****@cergis.com> wrote in message
news:#L**************@TK2MSFTNGP10.phx.gbl...
Hi,

I am writing a windows forms app that needs to list all the virtual servers
and their respective log file paths. The IIS6 metabse is nice and easy as it
is XML.

Is there any way to reading these details from the IIS5 metabase - which
appears to be a binary format?

Thanks in advance,

Stu

Nov 21 '05 #2
Stu
Perfect. Thank you.

"Shiva" <sh******@online.excite.com> wrote in message
news:OG**************@TK2MSFTNGP09.phx.gbl...
Hi,

One option is to use System.DirectoryServices namespace types. Here is a
sample:

-- Code Start --
DirectoryEntry root = new DirectoryEntry (@"IIS://localhost/W3SVC");
foreach (DirectoryEntry c in root.Children)
{
if (c.Properties["KeyType"][0].ToString() == "IIsWebServer")
Console.WriteLine (c.Properties["LogFileDirectory"][0].ToString());
}
-- Cod End --

I hope this is what you are looking for.

"Stu" <s.****@cergis.com> wrote in message
news:#L**************@TK2MSFTNGP10.phx.gbl...
Hi,

I am writing a windows forms app that needs to list all the virtual
servers
and their respective log file paths. The IIS6 metabse is nice and easy as
it
is XML.

Is there any way to reading these details from the IIS5 metabase - which
appears to be a binary format?

Thanks in advance,

Stu

Nov 21 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Piotrek Stachowicz | last post: by
reply views Thread by Lasse Nilsson | last post: by
reply views Thread by Rich | last post: by
2 posts views Thread by Raith | last post: by
34 posts views Thread by antonyliu2002 | last post: by
5 posts views Thread by David Veeneman | last post: by
2 posts views Thread by =?Utf-8?B?SmliZXkgSmFjb2I=?= | last post: by
reply views Thread by MrMoon | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.