?
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
Medium Priority
?
2,397 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Learn how to optimize MySQL for your business need

With the increasing importance of apps & networks in both business & personal interconnections, perfor. has become one of the key metrics of successful communication. This ebook is a hands-on business-case-driven guide to understanding MySQL query parameter tuning & database perf

Question has a verified solution.

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

Running classic asp applications under Windows Server 2008 R2 (x64) and IIS 7 is not as easy as one may think. It took me a while to figure it out while getting error 8002801d a few times. After you install the OS you will need to install the fol…
Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

752 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