views:

613

answers:

3

Can anyone suggest the best way of moving websites on server1 with IIS7 to server2 with IIS 7.5 on it? I've read some articles which suggest copying the applicationHost.config file while preserving the configProtectedData node, but I'm concerned there may be settings in the IIS 7.5 config that don't exist in the current IIS7 config which would be lost.

I've also seen suggestions of moving each site individually by using a command like this: AppCmd.exe LIST SITE "My Site" /config /XML > mysite.xml

This method just takes too long to do this for dozens of sites. There must be a better way of moving all the sites at once to the new platform.

A: 

You can actually copy paste the complete appHost.config file except the <configProtectedData> section. Use windiff to compare the two appHost.config and then move the ones that are missing...

Hope this helps.

Vivek
A: 

I think I found the solution that worked best for me. You need to export the shared configuration from BOTH 7.0 and 7.5 servers. Copy the exported 7.0 files to a temp directory on the 7.5 server. On the 7.5 server, copy the exported 7.5 administration.config file over the top of the 7.0 file, thereby replacing it. In IIS 7.5, point your shared configuration to the temporary directory. The point here is to use the administration.config from the new server and not from the 7.0 server. Been working great for me since. The problem seems to stem from the node moduleProviders in this file. They are all version 7.0.0.0 in the file from IIS 7, which IIS 7.5 does not like.

Adam Winter
A: 

Using Web Deploy is probably one of the simplest ways, you can do that directly to the live server, or you could do it to an offline package (zip file) and then apply at any time. Download at: http://www.iis.net/download/WebDeploy

Simple command line like:

msdeploy.exe -verb:sync -source:apphostconfig="Default Web Site" -dest:apphostconfig="Default Web Site",computername=Server2 -whatif

-whatif tells it to just tell the differences that it would create, and If you remove it, it will apply all the changes to sync (if it does not exist it will create it).

Sample: http://learn.iis.net/page.aspx/446/synchronize-iis-7/

this is cool because it can bring also content files, COM objects, Assemblies in the GAC, registry keys, certificates, ssl bindings and more.

CarlosAg