Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > General .NET
|
General .NET For general discussion of MICROSOFT .NET topics that don't fall within any of the other .NET forum subcategories or .NET language forums.  If your question is specific to a language (C# or Visual Basic) or type of application (Windows Forms or ASP.Net) try an applicable forum category. ** PLEASE BE SPECIFIC WITH YOUR QUESTION ** When posting here, provide details regarding the Microsoft .NET language you are using and/or what type of application (Windows/Web Forms, etc) you are working in, if applicable to the question. This will help others answer the question without having to ask.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the General .NET section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 24th, 2005, 11:16 AM
Registered User
 
Join Date: Jan 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default adsi and iis virtual directories

Hi all,

I'm trying to obtain the properties of my IIS5 sites through ADSI. Some I can get like IIS-path, site description, bindings and so on (see below). However, I'm a bit blank on how to get the physical paths for the site rootdirectories.

Could someone offer me a suggestion as to how to continue? Thanks a bunch!



Dim oIISAdmin As System.DirectoryServices.DirectoryEntry

Dim oChildDirectory As System.DirectoryServices.DirectoryEntry

Dim oProperties As System.DirectoryServices.DirectoryEntry

oIISAdmin = New System.DirectoryServices.DirectoryEntry("IIS://" + ServerName + "/W3SVC")

For Each oChildDirectory In oIISAdmin.Children

If IsNumeric(oChildDirectory.Name) Then

oWrite.WriteLine("IIS Path:" & oChildDirectory.Path)

oWrite.WriteLine("Site description:" & oChildDirectory.Properties("ServerComment").Value)

oWrite.WriteLine("Bindings:" & oChildDirectory.Properties("ServerBindings").Value )

End If

Next






Similar Threads
Thread Thread Starter Forum Replies Last Post
Sharing cookie data between virtual directories Crowandazi Classic ASP Components 1 February 21st, 2008 04:11 PM
iis virtual directory management snap in mattock ASP.NET 2.0 Basics 1 March 16th, 2006 08:19 AM
Setting up Virtual Dir in IIS dsuratman ASP.NET 1.0 and 1.1 Basics 4 June 20th, 2005 07:57 AM
Retriving IIS folder/directories name kadnan General .NET 1 December 15th, 2004 04:19 AM
Same Application Object for 2 Virtual Directories lian_a Classic ASP Basics 0 June 6th, 2004 10:10 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.