473,378 Members | 1,383 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,378 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 4139
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: 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
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.