Wednesday, 21 November 2012

Moving a site from IIS6 to IIS7

You’ll need to install Web Deployment Tool 1.1 on the source.  You might be able to get it here

Open the IIS6 console and you’ll see the apps installed

 image

Use the Identifier column in the following command to view the dependencies

Start a “Web Deploy Command Line”

image

Make sure you are admin

msdeploy -verb:getDependencies –source :metakey=lm/w3svc/1300211504

C:\Program Files\IIS\Microsoft Web Deploy>msdeploy -verb:getDependencies -source
:metakey=lm/w3svc/1300211504
<output>
  <dependencyInfo>
    <dependencies>
      <dependency name="AnonymousAuthentication" />
      <dependency name="WindowsAuthentication" />
    </dependencies>
    <apppoolsInUse>
      <apppoolInUse name="ADAuthDV" definitionIncluded="False" />
    </apppoolsInUse>
  </dependencyInfo>
</output>
C:\Program Files\IIS\Microsoft Web Deploy>

Then you can save it off with

msdeploy -verb:sync -source:metakey=lm/w3svc/1 -dest:package=c:\Site1.zip

If you are unlucky like me, you might need to add a password to the zip

Info: Adding child cert (MY\7D9D8D6756DAEB3B205D5C03250BB95DD4A70C39).
Error: The property 'blob' located at '/metaKey[@path='/lm/w3svc/1300211504']/me
taProperty[@name='SSLCertHash']/cert' is marked as secure. You must specify an e
ncryption password to archive this property.
Error count: 1.

C:\Program Files\IIS\Microsoft Web Deploy>msdeploy -verb:sync -source:metakey=lm
/w3svc/1300211504 -dest:package=c:\ADAuthDVLogin.zip,encryptPassword=P@ssw0rd99

Note the comma for the encryptPassword option

Copy them to your destination machine (2008R2 for IIS 7.5 in my situation)

You need to install the

“web platform installer” from http://www.iis.net/downloads

Install it, and then start IIS and you’ll see

image

Double-Click this and then choose products tab

Install the web deploy3 package

image

Restart IIS and you’ll now have import and export functionality

image

You need to import (note that you need to be one your machine name and use the “import server or site pacakge” option

Choose your zip file that you exported (Enter your password if you had one)

I also had to mess around with the application pool settings and edit the web.config files, but eventually it all started working.

No comments:

Extending JDE to generative AI