Web Deploy Troubleshooting Techniques
Applies To: Windows 7, Windows Server 2003, Windows Server 2003 R2, Windows Server 2008, Windows Server 2008 R2, Windows Vista, Windows XP
Web Deploy has a number of useful features for troubleshooting deployment operations. These features include the -whatif and -verbose operation settings. Their use is briefly discussed here, as are some common errors that you may encounter, and solutions to those errors.
Use the whatif operation setting
Your primary resource for validating an operation is the -whatif operation setting, which will show you what actions will be performed and catch certain error conditions. For example, you can use the -whatif operation setting to see the results of a sync operation before actually performing the synchronization.
Enable verbose output
If an operation did not go as expected and -whatif did not find any issues, you can use the -verbose operation setting. This is very useful for troubleshooting a failed sync operation because it returns the highest level of information available (Informational) about what happened in the operation.
For example, if you encounter an error during a synchronization, run the synchronization command again with the -verbose operation setting, and redirect the output to a text file, as in the following example.
msdeploy.exe -verb:sync -source:metakey=lm/w3svc/1,computerName=RemoteServer1 -dest:metakey=lm/w3svc/1 -verbose >msdeploysync-verbose.log
By specifying >msdeploysync-verbose.log, the results of the operation and all informational alerts will be listed in the log file for easy reference.
After the operation completes, look through the log file for entries that are related to the error that you received. For example, if a property was not set correctly, check the verbose logging actions to see why it was missed or skipped.
Common errors
Here are a few common errors and their potential solutions.
You are unable to read a configuration file.
This and similar errors may be the result of running from a non-elevated command prompt on Windows ServerĀ® 2008. Ensure that you have administrative credentials for operations that require it (for example, reading and writing configuration or registry settings). To open an elevated Command Prompt window, click Start, point to All Programs, click Accessories, right-click Command Prompt, and then click Run as administrator.
A path with commas causes a Web site or other object to not synchronize correctly.
Use double and single quotation marks around the path. For example, the path of an assembly contains commas and must be specified as in the following example.
-source:gacAssembly="'System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'"
ServerComment metabase properties are not recognized on IIS 7.
If your site has no server comment set on IIS 6.0, the ABO Mapper component will be unable to recognize server comments on IIS 7, and they will not be synchronized correctly.
You receive the message "Retrieving the COM class factory for component with CLSID {2B72133B-3F5B-4602-8952-803546CE3344} failed due to the following error: 80040154."
You may receive this error message when you try to use Web Deploy providers such as metaKey or appHostConfig and IIS is not installed on the source server or destination server. Install IIS on the source server or destination server and try again.
Remote service errors
You receive a "404 Remote file not found" error message.
You may receive this error if the URL is incorrect, or if the Web Deploy Web Deployment Agent Service (MsDepSvc) is not installed or running. The MsDepSvc startup type is Manual, so ensure that it is started.
The connection to the remote server times out or returns a time-out error.
Verify that the port for the remote service is open on the target server. If it is open, retry the command. Many times it will work after a retry.
See Also
Web Deploy appHostConfig Provider
Web Deploy gacAssembly Provider