Migrate The Websites From IIS 7.5 To IIS 10

Steps to Migrate the Websites from IIS 7.5 to IIS 10

In this blog, We will show you the steps to migrate the websites from IIS 7.5 to IIS 10

REQUIREMENTS

  • Windows Server 2008 R2 VM
  • Windows Server 2016 VM
  • Web Deploy Tool

Note : In this demo, we are migrating the websites from windows server 2008 R2 to Windows 2016 server.

ENVIRONMENT OVERVIEW

  • We are using 2 VM’s as Windows server 2008 R2 and Windows server 2016 respectively. Also, we have installed IIS on both the servers.
  • Apart from that, we have installed ASP .NET 4.5 in windows server 2008 R2 VM to run the ASP.NET 4.5 applications.
Steps to Migrate the Websites from IIS 7.5 to IIS 10
  • We enabled .NET 4.5 for DefaultAppPool in IIS.
Steps to Migrate the Websites from IIS 7.5 to IIS 10
  • Also, we have created two web application under default website as Alfrawebsite & TestApp.
Steps to Migrate the Websites from IIS 7.5 to IIS 10

INSTALLING WEBDEPLOY

Note : Follow the below steps to install WEBDEPLOY on both source (Windows server 2008 R2) and destination (Windows Server 2016) servers.

Steps to Migrate the Websites from IIS 7.5 to IIS 10
  • Scroll down and select the corresponding language for your region. In this demo, we are using the 64 bit English version.
Steps to Migrate the Websites from IIS 7.5 to IIS 10
  • Once the download is complete, Double-click on the MSI file. It opens the installation wizard. Click Next to continue.
Steps to Migrate the Websites from IIS 7.5 to IIS 10
  •  Select the I Accept the terms in the License Agreement check box and click Next.
Steps to Migrate the Websites from IIS 7.5 to IIS 10
  • Click on the Complete button.
Steps to Migrate the Websites from IIS 7.5 to IIS 10
  • Select Install button to begin the installation.
Steps to Migrate the Websites from IIS 7.5 to IIS 10
  • It will take few minutes to complete the installation. Click Finish to close the installation wizard.
Steps to Migrate the Websites from IIS 7.5 to IIS 10
Steps to Migrate the Websites from IIS 7.5 to IIS 10

PACKAGE CREATION IN SOURCE SERVER (WINDOWS 2008 R2)

  • Open the command prompt and run the below command to back up the IIS configuration before proceeding the migration.

%windir%\system32\inetsrv\appcmd add backup “PreWebDeployMigration”

Steps to Migrate the Websites from IIS 7.5 to IIS 10
  • IIS configuration backup will be available in  C:\windows\system32\inetsrv\backup folder.
Steps to Migrate the Websites from IIS 7.5 to IIS 10
  • Change the path to web deploy installed directory in command prompt. The default path is C:\Program Files\IIS\Microsoft Web Deploy V3 folder.
Steps to Migrate the Websites from IIS 7.5 to IIS 10
  • Execute the below command to get the dependencies of the website. Verify the output of the dependencies and make sure that those components were installed correctly on the destination server.

msdeploy -verb:getDependencies -source:metakey=lm/w3svc/1

Steps to Migrate the Websites from IIS 7.5 to IIS 10
  • In this demo, we have to change the DefaultAppPool .NET framework version from 2.0 to 4.0. So the same version of .NET needs to be installed on the destination server.
Steps to Migrate the Websites from IIS 7.5 to IIS 10

Note : As we are migrating the websites to windows 2016 (IIS 10) and we have already installed the .NET 4.6 in the destination server.

  • Execute the below command to create a compressed package file of IIS websites.

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

Steps to Migrate the Websites from IIS 7.5 to IIS 10
  • All the web application under default website was compressed as a zip file and placed it under C:\ drive. Also, you can verify the processed logs in C:\Program Files\IIS\Microsoft Web Deploy V3 folder.
Steps to Migrate the Websites from IIS 7.5 to IIS 10
Steps to Migrate the Websites from IIS 7.5 to IIS 10
  • Move the compressed package to the destination server. We moved the file through the local network share.
Steps to Migrate the Websites from IIS 7.5 to IIS 10
EXTRACT PACKAGE IN DESTINATION SERVER (WINDOWS 2016)
  • Execute the below command to validate the package with the server dependencies.

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

Steps to Migrate the Websites from IIS 7.5 to IIS 10
  • The above command will show the information if any dependencies is missing in the destination server.
  • As per this demo, We have already enabled .NET 4.6 through server manager.
Steps to Migrate the Websites from IIS 7.5 to IIS 10
  • Once you verified the output, run the same command without –whatif option.

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

Steps to Migrate the Websites from IIS 7.5 to IIS 10
  • Open the IIS manager and verify the web applications are available under default web site.
Steps to Migrate the Websites from IIS 7.5 to IIS 10
  • Verify the website by accessing through a web browser.
Steps to Migrate the Websites from IIS 7.5 to IIS 10
VIDEO

Thanks for reading this blog. We hope it was useful for you to learn about migrating websites from IIS 7.5 to IIS 10.

Loges