Install and Configure Web Deploy on IIS


Describes steps to setup an IIS website publish method between servers. This method will push web files from the source server to the destination server at the website level.

Install and Configure Web Deploy Service:

Download version 3.6

Install on IIS server using Admin level credentials

Select the Change option to adjust the services being installed and make sure the remote agent is installed


Verify the Web Deployment Agent service is installed and the service is to Auto start:


Set System Environment Variable:

On the server, or workstation, where the Web Deploy commands are to be executed, add the path to the MSDeploy.exe to the System Path variable in order to call MSDeploy.exe without a fully qualified path.

Windows Key + X -> System -> Advanced System Settings -> Environment Variables -> Path

Add the path C:\Program Files\IIS\Microsoft Web Deploy V3


How the Web Deploy Service Works:


This method will use the top path to allow only Admins to publish from the source web server to the destination, or target server using the Web Deploy service running on the destination server. The service must be set to auto-start and running to ensure the deployment is successful.

Setup Source IIS Server:

This server maybe part of the release pipeline as the staging, or prod IIS server and hosts the website files to move into the production environment.

Setup the website with the name, bindings, and path to application files comprising the website.

Test website to ensure it is fully functional.

Test the Sync Source to Target:

Verify the Web Deploy service is functional on the target, or destination server, by issuing the following commands from the command line:

msdeploy -verb:sync -source:apphostconfig="FabrikamDev" -dest:apphostconfig="FabrikamDev",computername= -whatif -verbose

The -source and -destination websites must be changed to match your environment as well the name, or IP of the remote server.

Here is a breakout of the syntax for Web Deploy:


Setup Script to Publish:

The method to perform the actual publish action is by removing the -verbose command and this will commit the changes to the remote IIS server.

msdeploy -verb:sync -source:apphostconfig="FabrikamDev" -dest:apphostconfig="FabrikamDev",computername=

Troubleshooting Web Deploy and other Resources:

Blog on different options with Web Deploy:

Errors publishing from Visual Studio and Console:

Troubleshooting Common Errors:

Web Deploy Error Codes:

Log File Location:


Comments (0)

Skip to main content