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
- 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.
- 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.
- We enabled .NET 4.5 for DefaultAppPool in IIS.
- Also, we have created two web application under default website as Alfrawebsite & TestApp.
Note : Follow the below steps to install WEBDEPLOY on both source (Windows server 2008 R2) and destination (Windows Server 2016) servers.
- Go to the below URL https://www.iis.net/downloads/microsoft/web-deploy to download the web deploy tool.
- Scroll down and select the corresponding language for your region. In this demo, we are using the 64 bit English version.
- Once the download is complete, Double-click on the MSI file. It opens the installation wizard. Click Next to continue.
- Select the I Accept the terms in the License Agreement check box and click Next.
- Click on the Complete button.
- Select Install button to begin the installation.
- It will take few minutes to complete the installation. Click Finish to close the installation wizard.
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”
- IIS configuration backup will be available in C:\windows\system32\inetsrv\backup folder.
- Change the path to web deploy installed directory in command prompt. The default path is C:\Program Files\IIS\Microsoft Web Deploy V3 folder.
- 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
- 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.
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
- 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.
- Move the compressed package to the destination server. We moved the file through the local network share.
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
- 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.
- 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
- Open the IIS manager and verify the web applications are available under default web site.
- Verify the website by accessing through a web browser.
Thanks for reading this blog. We hope it was useful for you to learn about migrating websites from IIS 7.5 to IIS 10.