SiteContainsConfigurationSection Class1
Web サイトとその構成セクションの間のリレーションシップを提供します。
構文
class SiteContainsConfigurationSection : ObjectConfigurationAssociation
メソッド
このクラスにはメソッドが含まれていません。
プロパティ
次の表では、SiteContainsConfigurationSection
クラスのプロパティを示します。
名前 | 説明 |
---|---|
Container |
IIS Web サイトを表す読み取り専用の Site オブジェクト。 |
Element |
Web サイトの構成セクションを公開する読み取り専用 の ConfigurationSection オブジェクト。 |
サブクラス
このクラスにはサブクラスがありません。
解説
関連付けは、オブジェクトのレベルで定義されているオブジェクトのインスタンスのみを返します。 たとえば、サイト レベルの Web.config ファイルで定義されている <authentication>
セクションが唯一のセクションである場合、ConfigurationSection
オブジェクトの AuthenticationSection インスタンスのみが返されます。
使用可能なすべてのセクションを取得するには、ConfiguredObject クラスの GetAllSections メソッドを使用する必要があります。
例
次の例では、既定の Web サイトの Web.config レベルで定義されているすべての構成セクションを一覧表示します。
' Connect to the WMI WebAdministration namespace.
Set oWebAdmin = GetObject("winmgmts:root\WebAdministration")
' Get the default Web site.
Set oSite = oWebAdmin.Get("Site.Name='Default Web Site'")
' List the configuration sections present in the Web.config file
' of the default Web site.
Set oSections = oSite.Associators_("SiteContainsConfigurationSection")
For Each oSection In oSections
WScript.Echo oSection.Path_.Class
Next
継承階層
ObjectConfigurationAssociation
SiteContainsConfigurationSection
要件
型 | 説明 |
---|---|
クライアント | - Windows Vista 上の IIS 7.0 - Windows 7 上の IIS 7.5 - Windows 8 上の IIS 8.0 - Windows 10 上の IIS 10.0 |
[サーバー] | - Windows Server 2008 上の IIS 7.0 - Windows Server 2008 R2 上の IIS 7.5 - Windows Server 2012 上の IIS 8.0 - Windows Server 2012 R2 上の IIS 8.5 - Windows Server 2016 上の IIS 10.0 |
Product | - IIS 7.0、IIS 7.5、IIS 8.0、IIS 8.5、IIS 10.0 |
MOF ファイル | WebAdministration.mof |
参照
ConfiguredObject.GetAllSections メソッド
ObjectConfigurationAssociation クラス
Site クラス
VirtualDirectoryContainsConfigurationSection クラス