Re: Reading the IIS metabase to list all virtual servers...
From: Shiva (shiva_sm_at_online.excite.com)
Date: 10/02/04
- Next message: TerryW: "Tcpclient Connection state"
- Previous message: Larry Serflaten: "Re: File.Exists and wildcards"
- In reply to: Stu: "Reading the IIS metabase to list all virtual servers..."
- Next in thread: Stu: "Re: Reading the IIS metabase to list all virtual servers..."
- Reply: Stu: "Re: Reading the IIS metabase to list all virtual servers..."
- Messages sorted by: [ date ] [ thread ]
Date: Sat, 2 Oct 2004 21:54:03 +0530
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.lock@cergis.com> wrote in message
news:#LhvYEHqEHA.3172@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
- Next message: TerryW: "Tcpclient Connection state"
- Previous message: Larry Serflaten: "Re: File.Exists and wildcards"
- In reply to: Stu: "Reading the IIS metabase to list all virtual servers..."
- Next in thread: Stu: "Re: Reading the IIS metabase to list all virtual servers..."
- Reply: Stu: "Re: Reading the IIS metabase to list all virtual servers..."
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|