次の方法で共有


IISComputer2 Interface

The IISComputer2 interface contains methods that can backup, restore, enumerate backups, or delete backups of the IIS metabase. This interface can be used from a C++ or Visual Basic application that uses ADSI. The required header files, Iiisext.h and IISext_i.c, are installed with Visual Studio and the IIS Software Developer Kit.

For a C++ code example that uses ADSI to configure the metabase, see Using ADSI to Configure IIS in a C++ Application.

Methods in Vtable Order

In addition to the methods inherited from IADs and IISComputer, the IISComputer2 interface exposes the following methods.

Method

Description

BackupWithPassword

Backs up the metabase to a location you specify by providing a backup location name of up to 100 characters in length. The backup file is encrypted using the password that you specify instead of using the machine key. Multiple metabase backups can be stored in a backup location.

RestoreWithPassword

Restores the metabase from a backup that was created with BackupWithPassword. If the backup was encrypted with a password, use the same password in this method. The restore operation stops all services dependent on the IIS Admin service (including all servers) until the restore has completed; then it restarts all services.

Export

Exports a section of the IIS metabase to a file for importing to the same IIS server or a different IIS server. The export file does not include machine-specific or system-specific data such as certain paths, GUIDs, passwords, and accounts.

Import

Imports a section of an IIS metabase from an export file that has been created on the same IIS server or a different IIS server. The export file does not include machine-specific or system-specific data such as certain paths, GUIDs, passwords, and accounts.

SaveData

Triggers IIS to create a set of history files (configuration data and schema) that back up the entire IIS metabase. History files can only be restored to the computer on which the files were created.

You must not have a handle open with write permission when you call this method, or the method will fail. The process waits for a few seconds for handles to close, so other processes with write handles open should not normally interfere with the save operation.

Requirements

Server: Requires Windows Server 2003.

Product: IIS

Header: Declared in iiisext.h; include iisext_i.c.

See Also

Concepts

IIS ADSI Provider Interfaces

Using ADSI to Configure IIS in a C++ Application

IIS Constants and Header Files

IISComputer Interface

IMSAdminBase

IMSAdminBase2