How to run Internet Information Services (IIS) in a Cloudhouse Container

22/07/2019 Cliff Hobbs   ID: 396045

Purpose

The purpose of this article is to detail how to run Microsoft's Internet Information Services (IIS) in a Cloudhouse Compatibility Container™.

Overview

IIS versions 6, 7, and 7.5 hosting web applications on legacy Microsoft Operating Systems (such as Windows Server 2003/2008), can be successfully migrated to newer OSs such as Windows Server 2016/2019, running a newer version of IIS (8.0/10.0) using Cloudhouse Containers.

There are two stages to achieve this:

Stage 1: Creating a Container for the Web Application

Follow the steps below to create a Container for the legacy web application. 

  1. Setup a vanilla build of the legacy OS.
  2. Install the IIS Application components.
  3. Install the Auto Packager as detailed in How to Install the Cloudhouse Auto Packager.
  4. Follow How to create a Cloudhouse Compatibility Container with the Auto Packager, installing and setting up the web application as you would typically do in the legacy OS. At the end of the packaging process, you will have a Cloudhouse Container that has captured the legacy web application.
  5. Follow Deploying Containers to copy and deploy the captured Container onto the modern OS. 

Stage 2: Configure IIS on the Target OS to work with the Legacy Container

Note

We do not recommend using this process to package legacy IIS versions 6, 7, and 7.5, as it is likely to be in breach of the Microsoft End-User Licensing Agreement (EULA) as IIS is a part of the Windows OS.

Each website hosted by IIS belongs to an Application Pool. When HTTP makes a request to IIS, the Application Pool provides an IIS worker process (w3wp.exe) to serve the request. The steps below show how to intercept IIS at the worker process level, which allows us to apply our compatibility features to any code executed by each website and not IIS itself. 

To intercept IIS at the worker process level:

  1. Create the following Registry file and apply it to the computer:
    Windows Registry Editor Version 5.00
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\w3wp.exe]
    "Debugger"="\"C:\\ProgramData\\Cloudhouse\\ContainerFolder\\AppAcceleratorV.exe\" \"/wkdir=C:\\ProgramData\\Cloudhouse\\ContainerFolder\" /f"

The registry path in red above needs to be modified to point to where the  Container was deployed in Stage 1.

Note

It is important to set "/wkdir=path" as an argument to the working directory of AAV. Otherwise, it inherits the working directory of the child process (C:\Windows\System32\inetsrv) and looks for the Container engine configuration file (AppAcceleratorV.clc) in that location.

  1. Next, edit the Default Web Site Site using the Internet Information Services (IIS) Manager application shortcut and ensure the Physical path is set to point to the wwwroot folder captured in the Container:

  1. Restart the Application Pool. The screenshot below shows the Start and Stop options available for the Default Applications Pool on Windows Server 2016 running IIS 10.0

  1. To confirm IIS is running as expected using the Container engine, open Internet Explorer (IE) on the IIS server. Then navigate to your web application and confirm this is displayed successfully.

The following screenshot (taken from Windows Server 2016 running IIS version 10.0) shows IIS running localhost successfully using the Cloudhouse redirection engine.

 

Monitoring tools such as Process Explorer will show you the worker process now running as a child process to our Container redirection engine, as shown below. 

This completes how to run (IIS) in a Cloudhouse Compatibility Container.

Source:
Was this article helpful?

Table of Contents

    Can't find what you're looking for?

    Contact Support