SiteContainsApplication Class1
Provides a relationship between a Web site and its applications.
Syntax
class SiteContainsApplication : ObjectContainerAssociation
Methods
This class contains no methods.
Properties
The following table lists the properties exposed by the SiteContainsApplication
class.
Name | Description |
---|---|
Container |
(Inherited from ObjectContainerAssociation.) A read-only Site object that represents an IIS Web site. A key property. |
Element |
(Inherited from ObjectContainerAssociation .) A read-only Application object that represents an IIS application. A key property. |
Subclasses
This class contains no subclasses.
Remarks
To implement this association, use the configuration API to enumerate the applications for a given site.
Example
The following example shows how to use the SiteContainsApplication
class to retrieve all the applications in a Web site.
' Connect to the WMI WebAdministration namespace.
Set oWebAdmin = GetObject("winmgmts:root\WebAdministration")
' Get the Web site.
Set oSite = oWebAdmin.Get("Site.Name='Default Web Site'")
' Use the SiteContainsApplication class to return the set of
' application instances in the 'Default Web Site' Web site.
Set oApps = oSite.Associators_("SiteContainsApplication")
For Each oApp In oApps
WScript.Echo oApp.Path
Next
Inheritance Hierarchy
SiteContainsApplication
Requirements
Type | Description |
---|---|
Client | - IIS 7.0 on Windows Vista - IIS 7.5 on Windows 7 - IIS 8.0 on Windows 8 - IIS 10.0 on Windows 10 |
Server | - IIS 7.0 on Windows Server 2008 - IIS 7.5 on Windows Server 2008 R2 - IIS 8.0 on Windows Server 2012 - IIS 8.5 on Windows Server 2012 R2 - IIS 10.0 on Windows Server 2016 |
Product | - IIS 7.0, IIS 7.5, IIS 8.0, IIS 8.5, IIS 10.0 |
MOF file | WebAdministration.mof |
See Also
Application Class
ObjectContainerAssociation Class
Site Class