Configure the Web Deployment Handler

This quick guide provides a basic overview of the steps to configure the Web Deployment handler on your hosted server and test that you can deploy to a Web site. This setup will be using the information in this document to install the Web Deployment Tool onto a new server, configure recommended settings and validate the rules created.

Prerequisites

This guide requires the following prerequisites:

• .NET Framework 2.0 SP1 or greater

• Web Deployment Tool 1.0

• IIS 7.0 with the Web Management Service installed

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

How the Handler Works

The handler is integrated with the Web Management Service (WMSVC) that ships with IIS 7.0 on Windows Server 2008.

  1. First, a user must be authorized to connect to a website or application using WMSVC's delegation. You allow a user to connect remotely to their website using the "IIS Manager Permissions" icon within their website. 
  2. Second, a user must then be authorized to perform deployments using the Web Deployment Tool. You allow a user to perform deployments by using the delegation rules for the handler that ships with the Web Deployment Tool. This quick guide will help you setup the necessary rules to allow a user to deploy IIS applications with content, set file permissions and deploy databases.

Part 1 - Server Setup and Deployment

1. Install IIS 7.0 and the Web Management Service on your Windows Server 2008 server.

2. After provisioning a Web site, configure delegation access for the appropriate user account to their Web site.

a) Additional info: http://technet.microsoft.com/en-us/library/cc770968.aspx

3. Download and install the Web Deployment Tool on the Web server.

4. Add a set of rules to allow customers to deploy content, applications and SQL databases following the steps in the “Adding Delegation Rules using MWA” topic below.

5. In order for the createApp rule to work (which simply allows a folder to be marked as an application and inherit all properties from the parent site), do the following:

a) Create a user account.

b) Grant read permission to %windir%\system32\inetsrv\config.

c) Grant modify permission to %windir%\system32\inetsrv\config\applicationHost.config.

6. Enable logging on your server.

a) Create a DWORD called TracingEnabled at HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WebManagement\Server.

b) Set it to 1.

7. Restart WMSVC.

The request tracing logs for WMSVC are stored in C:\inetpub\logs\wmsvc\TracingLogFiles\W3SVC1.

Adding Delegation Rules using MWA

1.     Download and install the Web Deployment Tool on the Web server.2.     Enable delegation rules for the providers that you want to allow.3.     Allow a user to deploy applications and content to their Website:a.     Open IIS Manager.b.     Select the Server node.c.     In Features View of the Server, double-click the Management Service Delegation icon.
d.     In the right-hand Actions pane, click Select Rule Template…
e.     Select the Deploy Applications with Content rule template. This template allows any WMSVC authorized users to deploy applications to their userScope (as shown in the diagram).
f.      Click OK to open the template.g.     Click OK to create the rule. 4.     Allow a user to create an application within their Website:a.     Click Select Rule Template… b.     Select the Mark Folders as Applications rule template. This template allows any WMSVC authorixed users to create applications within their userScope. The applications inherit all settings from the parent including application pool. c.     Click OK to open the template.d.     Under the RunAs section, click the Set… button to set a specific user to perform this operation. In order for this rule to work, the rule must run as a user that has access to write to applicationHost.config. It is recommended that you create an account that is not in the Administrators group and only grant it the minimum required permissions. To do this:                                  i.    Create a user account.                                 ii.    Grant read permission to %windir%\system32\inetsrv\config.                                iii.    Grant modify permission to %windir%\system32\inetsrv\config\applicationHost.config.

Tracing logs are stored in %systemdrive%\inetpub\logs\wmsvc\tracinglogfiles\w3svc1.

Testing the Server using IIS Manager

Create a package using IIS Manager

1. Navigate to the Web site containing the application you wish to deploy.

2. Follow the instructions in Create a Package.

Install a package using IIS Manager

1. Download and install the Web Deployment Tool on the client, or use the local server.

2. Open the IIS Manager.

3. Connect to the remote Web site.

4. Follow the instructions in Install a Package.

Summary

In this guide, we covered how to install and configure the Web Deployment Tool and handler, as well as create and install a package remotely.

Comments

This deployment handler was written based on iis7 server. Can I use it for iis 6 instead?

Apr 02 2009 by EdHsiao

Submit a Comment

You must Log In to comment.

Microsoft Communities