Search code examples
iismsdeploy

msdeploy -verb:sync webserver: 9000 error in destination event viewer


From Win2008-R2 to Win2012-R2:

The error on the destination is 9000 in the event log. Have looked high and low and do not see how to resolve this.

The command is:

msdeploy -verbose -verb:sync -source:webserver,computername=WIN-67E8GTGADGJ -dest:webserver,computername=192.168.2.21,userName="administrator",password="###" 

On the cmd line, the error returned is:

Error: (8/25/2015 5:07:09 PM) An error occurred when the request was processed on the remote computer.
Error: The ApplicationHost.config file is invalid. Cannot proceed with synchronization.
Error count: 1.

On the destination system, there is an error in the event log:

Microsoft-Windows-IIS-APPHOSTSVC -- message 9000

It seems like there should be a way to solve. The target is sparkly clean Win2012-R2 with IIS role

There are no useful docs on the web to engage this.

Note: A commenter on this thread keeps saying that msdeploy does not support IIS 8.x. That commenter is wrong. http://www.iis.net/downloads/microsoft/web-deploy

enter image description here


Solution

  • There seems to be real problems with msdeploy, but no one seems to understand (or document) why. The tool is primarily built to go from IIS 6.x (Win 2003) to newer IIS.

    In our experience, when going from IIS 7.x to 8.x, you often cannot use msdeploy with "source:webserver" approach. However, msdeploy can do a lot of the lifting for you from 7.x to 8.x.

    Here are some steps I have seen work:

    msdeploy -verbose -verb:sync -source:apphostconfig="WEB SITE NAME",computername=SOURCEMACHINE -dest:apphostconfig="WEB SITE NAME",computername=DESTINATIONMACHINE,userName="administrator",password="password-here"  -enableLink:AppPoolExtension
    

    Note the "enablelink" flag.

    Repeat the above with:

    • -enableLink:CertificateExtension and then
    • -enableLink:FrameworkConf

    Once this is done, msdeploy has done all it can. You should now have the site migrated, with content and app pools, and ssl certs, and the configuration related to the sites and app pools.

    For mime mappings, and other IIS system wide settings (compression is one example), you are on your own.