Using Custom Manifests

Author: Faith Allington

Published on March 23, 2008 by faith_a

Updated on May 29, 2009 by faith_a

Average Rating  Rate It (3)

RSS

This quick guide will help you create a custom manifest and sync it. We will sync a web site and also include the application pool, an external directory, assembly and COM object that are not automatically gathered for a web site.

Prerequisites

This guide requires the following prerequisites:

• .NET Framework 2.0 SP1 or greater

• Web Deployment Tool RC1

Note: If you have not already installed the Web Deployment Tool, see Installing the Web Deployment Tool.

Overview of a Manifest

A manifest is simply a grouping of providers into one definition. It is a way of specifying multiple paths, such as a web site, application pool and assembly. It can be used to specify multiple web sites, multiple directories or other paths.

Note: In this article, we show moving an IIS 7.0 based web site and application pool, but you could also use the manifest on IIS 6.0 to specify an IIS 6.0 based web site and application pool.

Sample manifest

<myCustomSite>

        <appHostConfig path="TestWebSite" />

        <appPoolConfig path="TestAppPool" />

        <dirPath path="C:\MyExtraFiles" />

        <gacAssembly path="'System.Web, Version=2.0.0.0, Culture=neut
ral, PublicKeyToken=b03f5f7f11d50a3a'" />

        <comObject path="Microsoft.ApplicationHost.AdminManager" />

</myCustomSite>

To create and use a custom manifest

1. Open Notepad and create an XML file. Let’s call it custom.xml.

2. Copy the sample manifest into custom.xml.

3. Copy custom.xml into your installation directory, %programfiles%\IIS\Microsoft Web Deploy.

4. Create a directory called MyExtraFiles in your C: drive.

5. Run the following command to sync the objects in the manifest to an archive:

msdeploy.exe -verb:sync -source:manifest=custom.xml -dest:archivedir=c:\archive > webdeployarchive.log

By specifying > webdeployarchive.log, the results of the archive will be listed in the log file and we can easily refer back to it.

Open the archive, you should now see the site itself and the extra directory specified. You can sync from the archive to the manifest (meaning you’ll sync from the archive to whatever providers are specified in your manifest).

You can also perform a live sync or migrate operation with a manifest without using an archive. In order to sync two live providers using a manifest, you need to sync with the source and destination both set to manifest.

To sync a site using a custom manifest

1. Run the following command to sync the manifest to a remote destination:

msdeploy.exe -verb:sync -source:manifest=custom.xml -dest:manifest=custom.xml,computername=Server1 > webdeploysync.log

Summary

You have now created a custom manifest and used it for operations. 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 migrate verb, see the MS Deploy manifest provider topic.

Comments

  1. Submitted on Oct 21 2008 by
    patrick.obrien13@comcast.net
    Faith, When creating a custom manifest where can I find all of the possible variables that can be included in a manifest? The sample you provide shows a few of them;
    appHostConfig path= />
    appPoolConfig path= />
    dirPath path= />
    gacAssembly path= />
    comObject path= />

  2. Submitted on Nov 10 2008 by
    faith_a
    Hi Patrick,

    All of the items are the providers listed either in our Help file or in the help output of the tool.

    For other questions, please also visit our forum for faster responses :) - http://forums.iis.net/1144.aspx

    -faith

You must Log In to comment.