Solved

Use Web Deploy 2.0 (msdeploy) to Migrate Web Server from IIS 7.0 32-bit to IIS 7.5 64-bit

Posted on 2011-09-05
5
2,329 Views
Last Modified: 2012-05-12

My goal is to move an entire web/application server from a 32-bit machine running Windows Web Server 2008 (IIS 7.0 - Version 6.0, Build 6002: Service Pack 2) to a 64-bit machine running Windows Web Server 2008 R2 (IIS 7.5 - Version 6.1, Build 7601: Service Pack 1)

I have installed Web Deploy 2.0 on both the source and destination machines and confirmed that the service is running on both, set to start automatically and running under the Network Service account. I have also successfully created the server export with no known errors using the following command:

msdeploy -verb:sync -source:webServer -dest:archiveDir=d:\exportedfiles,encryptPassword=mypassword

I have copied the entire folder d:\exportedfiles to the c: drive of the destination server.

Running an administrative (elevated) command prompt, I am trying to execute the following command to import the server to the new machine:

msdeploy -verb:sync -source:archiveDir=c:\exportedfiles,encryptPassword=mypassword -dest:auto -whatif

The destination server is a domain member and I am logged in to the machine using the built-in domain administrator account (DOMAIN\administrator). I have also added the DOMAIN\administrator account to the Local Administrators group on the destination server.

I have confirmed that the DOMAIN\administrator account has full access permissions to the c:\exportedfiles folder and all sub-directories and files.

The following is the error message that I keep receiving:

Error: Object of type 'archiveDir' and path 'c:\exportedfiles' cannot be created.
Error: The archive directory 'c:\exportedfiles' could not be loaded.
Error: The XML file 'c:\exportedfiles\archive.xml' could not be loaded.
Error: The 'location' start tag on line 64 does not match the end tag of 'section'. Line 181, position 11.
Error count: 1.

Running the previous command with -debug operator, the result is as follows:

Microsoft.Web.Deployment.DeploymentException: Object of type 'archiveDir' and pa
th 'c:\exportedfiles' cannot be created. ---> Microsoft.Web.Deployment.Deploymen
tException: The archive directory 'c:\exportedfiles' could not be loaded. ---> M
icrosoft.Web.Deployment.DeploymentException: The XML file 'c:\exportedfiles\arch
ive.xml' could not be loaded. ---> System.Xml.XmlException: The 'location' start
 tag on line 64 does not match the end tag of 'section'. Line 181, position 11.
   at System.Xml.XmlTextReaderImpl.Throw(Exception e)
   at System.Xml.XmlTextReaderImpl.Throw(String res, String[] args)
   at System.Xml.XmlTextReaderImpl.ThrowTagMismatch(NodeData startTag)
   at System.Xml.XmlTextReaderImpl.ParseEndElement()
   at System.Xml.XmlTextReaderImpl.ParseElementContent()
   at System.Xml.XmlTextReaderImpl.Read()
   at System.Xml.XmlLoader.LoadNode(Boolean skipOverWhitespace)
   at System.Xml.XmlLoader.LoadDocSequence(XmlDocument parentDoc)
   at System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean preserveWhitespace)
   at System.Xml.XmlDocument.Load(XmlReader reader)
   at Microsoft.Web.Deployment.ArchiveXmlDocument.Load(Stream stream, String path)
   --- End of inner exception stack trace ---
   at Microsoft.Web.Deployment.ArchiveXmlDocument.Load(Stream stream, String path)
   at Microsoft.Web.Deployment.ArchiveXmlDocument.Load(String path)
   at Microsoft.Web.Deployment.ArchiveProvider..ctor(DeploymentProviderContext providerContext, DeploymentBaseContext baseContext, String path)
   --- End of inner exception stack trace ---
   at Microsoft.Web.Deployment.ArchiveProvider.GetAttributes(DeploymentAddAttributeContext addContext)
   at Microsoft.Web.Deployment.DeploymentObject.EnsureValidAttributes()
   --- End of inner exception stack trace ---
   at Microsoft.Web.Deployment.DeploymentManager.CreateObjectPrivate(DeploymentProviderContext providerContext, DeploymentBaseOptions baseOptions, DeploymentObject sourceObject)
   at Microsoft.Web.Deployment.DeploymentManager.CreateObject(DeploymentProviderOptions providerOptions, DeploymentBaseOptions baseOptions)
   at MSDeploy.MSDeploy.CreateObject(DeploymentProviderOptions providerOptions, DeploymentBaseOptions baseOptions)
   at MSDeploy.MSDeploy.ExecuteWorker()
   at MSDeploy.MSDeploy.Execute()
   at MSDeploy.MSDeploy.Main(String[] unusedArgs)
Error count: 1.

What am I missing here to get this import to run successfully?
0
Comment
Question by:boomtowncio
  • 3
  • 2
5 Comments
 

Author Comment

by:boomtowncio
ID: 36486392
Since my last post, I have also tried "pulling" the deployment package to the destination server (both of these commands were executed on the destination server) but still have the same error when attempting to import:

This runs successfully:
msdeploy -verb:sync -source:webserver,computername=WWW6 -dest:archiveDir=c:\export,encryptPassword=mypassword > msdeployexport.log

This fails with the same error as before:
msdeploy -verb:sync -source:archiveDir=c:\export,encryptPassword=mypassword -dest:auto > msdeployimport.log
0
 
LVL 30

Expert Comment

by:Brad Howe
ID: 36959106
As mentioned in your other post.  You need to include the -enableLink option.

http://technet.microsoft.com/en-us/library/dd569089(WS.10).aspx

On source:
msdeploy.exe -verb:sync -source:appHostConfig="Default Web Site",encryptpassword=somepass -dest:archiveDir="D:\Sites\Default Web Site",encryptpassword=somepass  -enableLink:AppPoolExtension

On destination (after archive is copied over):
msdeploy.exe -verb:sync -source:archiveDir:"D:\Sites\Default Web Site",encryptpassword=somepass -dest:appHostConfig="Default Web Site",encryptpassword=somepass

let us know,
Hades666
0
 
LVL 30

Expert Comment

by:Brad Howe
ID: 36959107
Wrong question... Let me read this again :/

sorry,
Hades666
0
 

Accepted Solution

by:
boomtowncio earned 0 total points
ID: 36977658
I ended up answering my own question. The solution is as follows:

Before importing, the following edits must be made to the archive.xml file when migrating from IIS 7.0 32-bit to IIS7.5 64-bit:
Fields not compatible for import in archive.xml:

1. Under section name="system.webServer/httpCompression", comment out the entry for scheme name="deflate". e.g.
<!--<scheme name="deflate" MSDeploy.name="2" doStaticCompression="true" doDynamicCompression="true" MSDeploy.doDynamicCompression="1" dll="%windir%\system32\inetsrv\gzip.dll" MSDeploy.dll="8" staticCompressionLevel="9" dynamicCompressionLevel="9" MSDeploy.MSDeployKeyAttributeName="name" />-->

2. Comment out any section name="system.webServer/httpErrors" entries as importing custom error pages is not supported.
Not commenting out these elements will result in the following error message when importing:
"Error: Attempted to read or write protected memory. This is often an indication that other memory is corrupt."

Other notes:

3. After import, manually set all application pools to 32-bit True as they will be imported as False.

4. Manually need to set-up any custom error pages for the imported sites as they were commented out in the archive.xml file and not imported.

Be sure to comment out the ENTIRE <section name="system.webServer/httpErrors" . . . /section>
This can span numerous lines. If not will get the following error:
Error: Object of type 'archiveDir' and path 'c:\exportedfiles' cannot be created.
Error: The archive directory 'c:\exportedfiles' could not be loaded.
Error: The XML file 'c:\exportedfiles\archive.xml' could not be loaded.
Error: The 'location' start tag on line 64 does not match the end tag of 'section'. Line 181, position 11.
Error count: 1.
0
 

Author Closing Comment

by:boomtowncio
ID: 37005174
After an extensive amount of research and trial and error I ended up answering my own question
0

Featured Post

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
IIS 7 Basic Auth keeps asking for password 5 94
502 - Web server received an invalid response 4 88
How to know how many IP addresses your ISP give you 4 26
IIS redirect 1 67
Lync server 2013 or Skype for business Backup Service Error ID 4049 – After File Share Migration
As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

785 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question