Compartilhar via


IMSAdminBase::SaveData

The IMSAdminBase::SaveData method explicitly saves the metabase configuration data and schema to disk in the metabase storage files, by default named MetaBase.xml and MBSchema.xml respectively. These files exist in the inetsrv directory.

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.

HRESULT SaveData(
);

Parameters

This method has no parameters.

Return Values

Returns an HRESULT that contains one of the following values:

Value

Description

HRESULT_FROM_WIN32(ERROR_PATH_BUSY)

The path specified cannot be used at this time.

S_OK

The method succeeded.

File system error codes

See winerror.h for information about specific error codes.

Remarks

All data in the metabase is saved, including data written by other applications.

This method will fail and return HRESULT_FROM_WIN32(ERROR_PATH_BUSY) if there are any open write handles to the metabase.

Metabase configuration data and schema is saved when IIS shuts down, so you usually do not need to call this method. However, for critical data it is recommended that you call this method whenever appropriate for your application.

Requirements

Client: Requires Windows XP Professional, Windows 2000 Professional, or Windows NT Workstation 4.0.

Server: Requires Windows Server 2003, Windows 2000 Server, or Windows NT Server 4.0.

Product: IIS

Header: Declared in iadmw.h; include iiscnfg.h.