Using Custom Manifests
by Faith A
This quick guide will help you create a custom manifest and synchronize it. We will synchronize a Web site and include the application pool, an external directory, and an assembly and COM object that are not automatically gathered for a Web site.
This guide requires the following prerequisites:
- .NET Framework 2.0 SP1 or greater
- Web Deployment Tool 1.1
Note: If you have not already installed the Web Deployment Tool, see Installing Web Deploy.
Overview of a Manifest
A manifest is simply a grouping of providers into one definition file. It is a way of specifying multiple paths that will be included in a synchronization, such as a Web site, an application pool, and an assembly. It can be used to specify multiple Web sites, multiple directories or other paths.
Note: In this article, we show how to move an IIS 7 and above Web site and application pool, but you could also use the manifest on IIS 6.0 to specify an IIS 6.0 Web site and application pool.
<myCustomSite> <appHostConfig path="TestWebSite" /> <appPoolConfig path="TestAppPool" /> <dirPath path="C:\MyExtraFiles" /> <gacAssembly path="'System.Web, Version=18.104.22.168, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'" /> <comObject path="Microsoft.ApplicationHost.AdminManager" /> </myCustomSite>
To create and use a custom manifest
Open Notepad and create an XML file. Let's call it Custom.xml.
Copy the sample manifest into Custom.xml.
Copy Custom.xml into your installation directory, %programfiles%\IIS\Microsoft Web Deploy.
Create a directory called MyExtraFiles on your C: drive.
Run the following command to synchronize the objects in the manifest to a package (compressed) file:
msdeploy.exe -verb:sync -source:manifest=Custom.xml -dest:package=c:\CustomPackage.zip > WebDeployPackage.log
By specifying > WebDeployPackage.log, the results of the package will be listed in the log file and you can easily refer back to it.
Open the package. You should see the site itself and the extra directory specified.
Later, you can use the package as the source and synchronize it to a destination that is specified by the manifest file (meaning you'll synchronize from the package to the providers that are specified in your manifest).
You can also perform a sync operation with a manifest live, without using a package. In order to synchronize with a manifest, both the source and the destination arguments must specify a manifest file.
To synchronize a site by using a custom manifest
Run the following command to synchronize the manifest to a remote destination. The remote computer is specified by the computername argument.
msdeploy.exe -verb:sync -source:manifest=custom.xml -dest:manifest=custom.xml,computername=Server1 > webdeploysync.log
You have now created a custom manifest and used it for synchronization. You can further extend the manifest by adding any provider paths that are important for your Web site or server, such as a registry key or an assembly in the GAC. For more information about the manifest provider, see Web Deploy manifest Provider.