By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,582 Members | 1,694 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,582 IT Pros & Developers. It's quick & easy.

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

P: n/a
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
Share this Question
Share on Google+
2 Replies


P: n/a
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

P: n/a
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.