Partager via


IWamAdmin::AppDeleteRecoverable

The IWamAdmin::AppDeleteRecoverable method deletes a Web application definition that you can recover later with the IWamAdmin::AppRecover method.

The AppDeleteRecoverable method is primarily used when moving, copying, or renaming metabase keys. This method shuts down the specified application if it is running, and marks the metabase key as deleted. If the application is in-process with IIS, all out-of-process resources associated with the application will be released if the resources are not referenced by another in-process application.

Note

Server component DLLs are not released from in-process applications, even if they aren't currently referenced by other applications.

The metabase key is marked as stopped, and subsequent requests to run the application will return an error. The metabase properties MD_APP_ROOT (Automation name AppRoot) and MD_APP_FRIENDLY_NAME (Automation name AppFriendlyName) will not be deleted.

HRESULT STDMETHODCALLTYPE AppDeleteRecoverable(
      LPCWSTR szMDPath,
      BOOL fRecursive
);

Parameters

  • szMDPath
    [string][unique][in] Specifies the metabase path to the starting point of the application.

  • fRecursive
    [in] Specifies whether applications are to be deleted (but remain recoverable) from this key and all subkeys (TRUE), or just the application at this key (FALSE).

Return Values

The method will return S_OK if the method succeeded, including the case that no application was defined at the specified path. If the method fails, other error codes converted to an HRESULT will be returned.

Remarks

It is recommended, but not strictly necessary, that you use AppDeleteRecoverable when copying metabase keys.

If you don't use AppDeleteRecoverable to copy a metabase key, the site that you're moving or copying remains alive during the operation and users can make requests on it if the key was removed mid request.

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 iwamreg.h.