Quick Start : IIS | Minicoder

How to get IIS site object via ADSI ?

public function get_IIS_Website(webSvrID)
    on error resume next
        set get_IIS_Entry = GetObject("IIS://Localhost/W3SVC/" & webSvrID)
        if (Err.Number <> 0) then
            on error goto 0
            Err.Raise 10000, "get_IIS_Entry", "failed"
        Else
            if (get_IIS_Entry.Class <> "get_IIS_Website") Then
                on error goto 0
                Err.Raise 1000, "get_IIS_WebSite", "incorrect"
            end if    
        end if
    on error goto 0
end function

How to get IIS site object via WMI ?

How to get IIS site object via APPCMD?

How to get IIS site object via Shell?

What is IIS metabase?

In IIS, the metabase stores information about the configuration of IIS. A developer can create Web sites, virtual directories, change performance and security settings, install ISAPI DLLs, and make choices about what information is written to the IIS log files, and all of that information is stored in the metabase. 

quote from msdn.microsoft.com

According to above information, Microsoft's Internet Information Services stores its information in an internal database called the MetaBase. Developer are able to use ADSI provider or WMI provider to handle metabase data and finally programmatic changes get written to the in-memory metabase.

We need pay attention to metabase format , different versions of IIS use different formats; prior to IIS version 6 database was always a proprietary format, whereas with 6.0 and later the data is stored in XML files. The metabase consists of two files, MetaBase.xml and MBSchema.xml, stored in the %SystemRoot%\system32\inetsrv\ directory. The metabase periodically gets backed up to the MetaBack subdirectory. 

Internet Information Services' central metabase is eliminated in IIS version 7 in favor of a set of XML configuration files that are located centrally in the Machine.config and ApplicationHost.config files and within the web site's infrastructure using web.config files. This allows for synchronization of web sites across servers by including all configuration information within the web site's root directory. 

What is ADSI Provider?

The ADSI provider, like the WMI provider, provides a standard syntax for accessing IIS configuration data through the use of the IIS admin objects. The admin objects in the IIS ADSI provider inherit useful methods and properties from Windows ADSI objects and container objects that help configure data in the metabase.

quote from msdn.microsoft.com

Due to ADSI rely on metabase structure , however, the metabase is deprecated in IIS7 and above version. We need install 6.0 compatibility role for Internet Information Services first in order to use ADSI provider.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值