How Do I Migrate a Single Application from IIS6 to IIS7?
Solution 1
Here is the command that just got through working for me:
msdeploy -verb:sync
-source:metakey=lm/w3svc/1,computerName=original,encryptPassword="pwd",includeAcls=true
-disableLink:ContentExtension
-dest:package=original.zip,encryptPassword="pwd"
-enableLink:AppPool
-skip:WebApplication="^.*$" >original.log
After this, I then deployed the application itself from the latest web deploy package.
I had a few problems. At first, when I clicked the "Default Web Site" in IIS Manager, I got an error that application "/" was not defined. I needed to set the site directory to D:\inetpub\wwwroot
.
Also, the above command accurately migrated the IP address of the original server. It was necessary to edit the bindings to use the correct IP address.
Other than that, everything looks good right now.
Solution 2
The basic answer is: Use the Web Deployment Tool.
You'd use something like
msdeploy -sync -source:metakey=lm/w3svc/1 -dest:package=c:\backupSite.zip -enableLink:AppPool
(Where 1 is the IIS site identifier) on the source machine, and then the same thing in reverse on the target:
msdeploy -sync -source:package=c:\backupSite.zip -dest:metakey=lm/w3svc/1
While you're restoring it to an IIS7 server, you still need to use the same restoration target type as was specified as the source (i.e. metakey).
You can add -whatif to the end to view what it's planning to do.
More here: http://technet.microsoft.com/en-us/library/ff633422(v=WS.10).aspx
and here: http://learn.iis.net/page.aspx/427/migrate-a-web-site-from-iis-60-to-iis-7-or-above/
Related videos on Youtube
Comments
-
John Saunders over 1 year
I have a number of applications currently running on a Windows Server 2003 system. We'd like to migrate one of those applications to IIS7 on a Windows Server 2008 R2 box. This is a new web server, has IIS installed, but nothing else.
I know how to migrate the entire server, and even the entire site, but how do I migrate the server-wide settings, the site-wide settings, the app pool used by the application and then the application itself?
-
John Saunders about 12 yearsSorry for the lack of detail. The application is a simple ASP.NET MVC 2 application with its own forms-based authentication. Very simple. It is currently running on .NET 4.0.
-
-
Ov's Pianist about 12 yearsNo, it doesn't, it just migrates the site (i.e. IIS Web Site object) with identifier 1. If you're not referring to an IIS Website (i.e. a top-level name binding) as a site, but an application, virtual directory, subfolder etc, you can do that too - just specify the metabase path to that "site" (lm/w3svc/1/subsite/).
-
Ov's Pianist about 12 years
-
John Saunders about 12 yearsI was in fact referring to
/lm/w3svc/1
. I wanted all of the server-level settings, the site "Default Web Site", and the one application.