Setting up MSDeploy for remote web publishing to IIS

 

  1. Open TCP port 8172 on the server.
  2. Make sure that the IIS Management service is installed. Click on the "Web Server" role and then view the roles services on the right.
[<img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="2011-08-16_125512" src="http://i2.wp.com/www.joelbeckham.com/wp-content/uploads/2011/08/2011-08-16_125512_thumb.gif?resize=211%2C75" alt="2011-08-16_125512" border="0" data-recalc-dims="1" />][1][<img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="2011-08-16_125604" src="http://i1.wp.com/www.joelbeckham.com/wp-content/uploads/2011/08/2011-08-16_125604_thumb.gif?resize=429%2C84" alt="2011-08-16_125604" border="0" data-recalc-dims="1" />][2]
  1. If it isn’t, add it through "Add Roles Services"
  2. Install WebDeploy 2.0 (http://www.iis.net/download/WebDeploy) . Check to install everything but the agent service.
  3. Create a local or domain user which will have permission to deploy. We’ll use it later.
  4. In IIS, expand the tree down to your site. Open up "IIS Manager Permissions".[
<img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="2011-08-16_125956" src="http://i0.wp.com/www.joelbeckham.com/wp-content/uploads/2011/08/2011-08-16_125956_thumb.gif?resize=349%2C384" alt="2011-08-16_125956" border="0" data-recalc-dims="1" />][3]
  1. Allow user –> add the user you just created
  2. Go up to the server level in IIS.
  3. Open up Management Service
  4. Make sure "Enable remote connections" is checked. If it’s not, stop the service, check it, then restart the service.
  5. Back at the server level, go to "Management Service Delegation"
  6. Add Rule. I typically use the "Deploy Content Only" template to start with because it adds the contentPath provider by default which is what I typically use. Add any additional providers here. OK.
[<img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="2011-08-16_130322" src="http://i2.wp.com/www.joelbeckham.com/wp-content/uploads/2011/08/2011-08-16_130322_thumb.gif?resize=257%2C393" alt="2011-08-16_130322" border="0" data-recalc-dims="1" />][4]
  1. After creating the rule, right click –> "Add user to rule". Enter in the user you created earlier.
  2. In IIS expand back down to your site. Right click –> "Edit Permissions". On the security tab, add the user your created earlier. Grant them read, write, modify, (maybe delete and delete subfolders and files).

 

I’ll cover the client side set up next.