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

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
2 4138
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Steve Noveman | last post by:
Hi, I need to programmaticaly create and configure a new virtual directory on IIS6.0. The virtual directory path is a network share. Therefore, I need to set up this network's Security...
1
by: Roger | last post by:
I need to edit the IIS 6.0 config file (metabase.xml) and had a go with this code, trying to get a list of all defined websites, and write their name to console, but it does not seem to work, would...
1
by: Piotrek Stachowicz | last post by:
Hi, I'd like to display list of all MS SQL servers which are available on the network (I write application which uses database located on one of the machines in my LAN). Has anyone got any idea...
0
by: Lasse Nilsson | last post by:
Hi all, I've got a deployment issue I hope is solvable at all, and appreciate all help anyone can give me. We've got an ASP.NET-application (a sort of function library shared by our customers,...
0
by: Rich | last post by:
Created a simple ASP.NET 2.0 web site with Visual Studio 2005 Professional. New ... > Web Site All I added was an html string ("Hello ASP.NET 2.0") in Default.aspx. Debugging (F5) works OK when...
2
by: Raith | last post by:
Hi, I'm trying to write an application to modify certain IIS metabase entries (AllowKeepAlive, ASPProcessorThreadMax etc.) on remote web servers (Win2000 IIS5) over the network. I'm confident...
34
by: antonyliu2002 | last post by:
I've set up the virtual smtp server on my IIS 5.1 like so: 1. Assign IP address to "All Unassigned", and listen to port 25. 2. Access Connection granted to "127.0.0.1". 3. Relay only allow...
5
by: David Veeneman | last post by:
I had to reformat my Windows XP Professional development machine yesterday and reinstall everything, including IIS and VS 2005. I thought I had worked out the procedure to get ASP.NET up and...
2
by: =?Utf-8?B?SmliZXkgSmFjb2I=?= | last post by:
Hi: I'm getting this error when I try to browse to a .aspx page that is located on a virtual directory located on my Win XP Pro machine. There's more text in the page that is displayed that says...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.