.NETGURU
Traverse IIS Metabase with .NET
Messages   Related Types
This message was discovered on ASPFriends.com 'ngfx-adsi' list.
Responses highlighted in red are from those people who are likely to be able to contribute good, authoratitive information to this discussion. They include Microsoft employees, MVP's and others who IMHO contribute well to these kinds of discussions.

Steve Schofield (VIP)
Here some code I'm using in the System.DirectoryServices to extract the LogFileDirectory path property. This one value isn't always populated in every top-level domain on an IIS server. It is inherited from the top W3SVC setting and if it's been set for an individual top-level domain this LogFileDirectory property will be set otherwise won't exist. I'd like to know how to traverse the entire metabase to determine this one property in the metabase under each Top - level domain on. Trying to traverse the metabase using the System.DirectorServices namespace has been a bit challenging. Any tips, I"m stumped?

using System;
using System.DirectoryServices;
//our custom namespace
namespace myNamespace
{

//our custom class
public class domain
{
public domain(string logpath)
{
logPath = logpath;
}

//some member variables
private string logPath;
public string LogPath
{
get {return logPath;}
set {logPath=value;}
}

public string C(string domainName, string logPath)
{
string strPath = "IIS://docs.aspfree.com/" + logPath;
System.DirectoryServices.DirectoryEntry ds = new DirectoryEntry(strPath);
object s = ds.Properties["LogFileDirectory"].Value;
return s.ToString();
}
}
}
* ----------------------------------------- *
* Steve Schofield
* Click here to reveal e-mail address
*
* Microsoft MVP - ASP.NET
* http://www.aspfree.com
* ----------------------------------------- *
Reply to this message...
 
    
Brad Kingsley
Can you just assume that if it isn't populated it equals the top-level
value?

~Brad Kingsley
Microsoft MVP - ASP
Windows 2000 MCSE

http://www.orcsweb.com/
Powerful Web Hosting Solutions
#1 in Service and Support

----- Original Message -----
From: "Steve Schofield" <Click here to reveal e-mail address>
To: "ngfx-adsi" <Click here to reveal e-mail address>
Sent: Thursday, May 23, 2002 8:49 PM
Subject: [ngfx-adsi] Traverse IIS Metabase with .NET

> -- Copied from [aspngfreeforall] to [ngfx-adsi] by Clint Barton
<Click here to reveal e-mail address> --
[Original message clipped]

---
[This E-mail scanned for viruses by Declude Virus]

Reply to this message...
 
 
System.DirectoryServices.DirectoryEntry




ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
Ad


Need Dot Net Interview Questions?
Ask ExamGuru, Inc. for advice and help on Passing .Net Interviews
.Net Projects
Best-of-breed application framework for .NET projects, developed by ExamGuru, Inc. and ExamGuru IT
Free .net Help
Commission ExamGuru, Inc. and his team for your next bespoke software project
FogBUGZ
The only bug tracking system carefully crafted with one goal in mind: helping teams create great software.
Awesome Tools
If you don't know about these, you're missing out... IT Certification Questions
IT Interview Questions
Free Oracle 10g Training
MCSE Boortcamp
Cisco Study Guides
Cheap Study Guides
Exact Questions
Dot Net Interview Questions
Oracle OCP
Cheap Travel
Designer Perfumes - Wholesale Prices
Free Programming Tutorials
 
ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
 Copyright © ExamGuru, Inc. 2001-2006
Contact Us - Terms of Use - Privacy Policy - www.dot-net-guru.com - www.examguru.net - www.oraclesource.net - www.itinterviews.net - www.examguru.net/ITCertification