Considerations for Supporting IIS 6 on 64-Bit Platforms

InstallShield 2020

Project:This information applies to the following project types:

Basic MSI
DIM
InstallScript MSI
Merge Module

If your IIS installation may be run on a 64-bit version of Windows with the .NET Framework, you can use the ASP.NET Platform setting in the Internet Information Services view for a Web site or application. This setting lets you specify which ASP.NET platform should be used to map the Web site or application to the ASP.NET version. By default, this setting is not configured in InstallShield; if you do not change the value of this setting, the installation assumes that 32-bit support is needed.

Depending on the value that you configure for the ASP.NET Platform and ASP.NET Version settings, the following behavior occurs by default at run time:

If the target system has a 32-bit version of Windows, the 32-bit version of the specified ASP.NET version is used.
If the target system has a 64-bit version of Windows, and 64 bit was specified for the ASP.NET platform, the Enable32bitAppOnWin64 property on the target system needs to be set to False. Otherwise, using the 64-bit version of ASP.NET on a system that is configured to support the 32-bit version would cause ASP.NET to become corrupted. Thus, the installation is aborted to prevent damage to ASP.NET services.
If the target system has a 64-bit version of Windows, and 32 bit was specified for the ASP.NET platform, the Enable32bitAppOnWin64 property on the target system needs to be set to True. Otherwise, using the 32-bit version of ASP.NET on a system that is configured to support the 64-bit version would cause ASP.NET to become corrupted. Thus, the installation is aborted to prevent damage to ASP.NET services.

You can set the Enable32bitAppOnWin64 property on a target system that has IIS 7 by configuring the Enable 32-Bit Applications setting for an application pool in the Internet Information Services view. At run time, the installation sets the Enable32bitAppOnWin64 property as appropriate for the application pool that is being installed.

On systems with IIS 6, the Enable32bitAppOnWin64 property is a global property that affects all Web sites and applications on an IIS server. Since changing the value of that property at installation run time might cause other already installed Web sites and applications on that server to fail, installations that are created with InstallShield do not modify the Enable32bitAppOnWin64 property at run time if the target system has IIS 6.

At run time, you can have your installation check the Enable32bitAppOnWin64 property on systems that have IIS 6. Depending on the requirements for your product and the results of that check, you may want the installation to skip a particular component that contains a 32-bit IIS 6 application, or a 64-bit IIS application, for example, and proceed with the rest of the file transfer.

InstallShield includes a sample Windows Installer DLL file that detects how the Enable32bitAppOnWin64 property is set. Release and debug versions of the DLL file, as well as the Visual Studio 2008 C++ project that was used to create the file, are installed to the following location:

InstallShield Program Files Folder\Samples\WindowsInstaller\Detect IIS6 Compatibility

To use the Windows Installer DLL file in your project, you first need to create a custom action that calls the DetectIIS6AppPool32BitSupport function in the DetectIIS6Compat.dll file.

To add a custom action that checks for support for 32-bit applications on systems that have IIS 6:

1. In the View List under Behavior and Logic, click Custom Actions and Sequences (in Basic MSI or InstallScript MSI projects) or Custom Actions (in DIM or Merge Module projects).
2. In the center pane, right-click the Custom Actions explorer, point to New MSI DLL, and click Stored in Binary table. InstallShield adds a new custom action.
3. Change the name of the action to something like DetectIIS6AppPool32BitSupport.
4. Configure the custom action’s settings in the right pane:
In the DLL Filename setting, specify the path to the DetectIIS6Compat.dll file. The typical path is:

<ISProductFolder>\Samples\WindowsInstaller\Detect IIS6 Compatibility\DetectIIS6Compat.dll

In the Function Name setting, enter the following name:

DetectIIS6AppPool32BitSupport

In the In-Script Execution setting, select Immediate Execution.
Schedule the custom action as needed by selecting the appropriate option in one or more sequence settings.
In the condition setting, enter the following condition:

VersionNT<600

This condition ensures that the custom action is not run on Windows Server 2008 or later or on Windows Vista or later, since these operating systems would have IIS 7 or later.

At run time, the custom action sets the Windows Installer property ISIIS6APPPOOLSUPPORTS32BIT under certain conditions:

Windows Installer Property for Checking for 32-Bit Application Support on IIS 6 Systems

Target System Environment

Result

32-bit Windows, IIS 6

(The value of Enable32bitAppOnWin64 is not relevant.)

ISIIS6APPPOOLSUPPORTS32BIT is set to 1.

64-bit Windows, IIS 6, Enable32bitAppOnWin64=true

ISIIS6APPPOOLSUPPORTS32BIT is set to 1.

64-bit Windows, IIS 6, Enable32bitAppOnWin64=false

ISIIS6APPPOOLSUPPORTS32BIT is not set.

You can use the ISIIS6APPPOOLSUPPORTS32BIT property in conditional statements. For example, if your product cannot be used on an IIS 6 server without 64-bit application support, enter the following conditional statement in the Install Condition setting of the General Information view:

Not ISIIS6APPPOOLSUPPORTS32BIT

As an alternative, you can create an error custom action. At run time, an error would be displayed if the condition for that custom action is true. Thus, if your product cannot be used on an IIS 6 server without 64-bit application support, use the following condition for an error custom action:

ISIIS6APPPOOLSUPPORTS32BIT=1

If you have a component that should be installed only on IIS 6 servers that have 32-bit application support enabled, enter the following conditional statement in the Condition setting of the Components view:

ISIIS6APPPOOLSUPPORTS32BIT=1

See Also