IIS 64-Bit Mode Error When Building Verastream .NET Web Application Project

  • 7021548
  • 11-Sep-2008
  • 02-Mar-2018

Environment

Verastream Host Integrator version 7.0 or higher

Situation

When building a .NET Web Application project in Verastream Host Integrator (VHI) Web Builder, the build process may fail with an error similar to one of the following:

C:\Program Files (x86)\VHI\projects\<project name>\build.xml:96: The error indicates that IIS is in 64 bit mode, while this application is a 32 bit application and thus not compatible.

or

C:\Program Files (x86)\Attachmate\Verastream\HostIntegrator\projects\<project name>\build.xml:96: Start registering ASP.NET scriptmap (2.0.50727) at w3svc/1/root/<project name>.
Error when validating the IIS path (w3svc/1/root/<project name>). Error code = 0x80040154
The error indicates that IIS is in 64 bit mode, while this application is a 32 bit application and thus not compatible.

or

The error indicates that IIS is in 32 bit mode, while this application is a 64 bit application and thus not compatible.

Resolution

Use the following information to check or change the IIS mode, and configure Web Builder to match.

IIS Configuration on Windows Server 2008 or Windows 7

Use the following steps to check or change the IIS mode on Windows Server 2008 or Windows 7:

  1. Run the IIS Manager by opening Start > Control Panel > System and Security > Administrative Tools > Computer Management > Services and Applications > Internet Information Services (IIS) Manager. The steps may vary depending on your operating system.
  2. In the Connections frame, open Application Pools and select your web site pool.
  3. In the right pane, under Edit Application Pool, click Advanced Settings.
  4. In the Advanced Settings dialog, in the "(General)" section, select "Enable 32-Bit Applications."
  5. Set this value to False to run in 64-bit mode, or set it to True to run in 32-bit mode.

IIS Configuration on Windows Server 2003 or Windows XP

Use the following steps to check the IIS mode on Windows Server 2003 or Windows XP.

  1. Open Control Panel > Administrative Tools > Computer Management > Services and Applications > Internet Information Services (IIS) Manager > Web Sites. The steps may vary depending on your operating system.
  2. Right-click your web site and click Properties.
  3. On the Home Directory tab, under Application settings, click Configuration.
  4. In the Application extensions list, scroll down to extension .aspx and mouseover its Executable Path.
  5. The mouseover popup text indicates the .NET Framework directory that is being used.
    Mode
    Microsoft .NET Framework Directory
    32-bit
    C:\Windows\Microsoft.NET\Framework\v2.0.50727
    64-bit
    C:\Windows\Microsoft.NET\Framework64\v2.0.50727

Alternative IIS Configuration using Command Line Utility

Use the following information to check or change the IIS mode in a Command Prompt window. Note: On Windows 7 and later operating systems, you must install "IIS 6 Management Compatibility" to run the Adsutil.vbs utility. See also KB 7021546.

To determine the IIS mode, enter:

cscript %SYSTEMDRIVE%\inetpub\adminscripts\adsutil.vbs get W3SVC/AppPools/Enable32bitAppOnWin64

If the command returns False (0), IIS is in 64-bit mode. If it returns True (1), IIS is in 32-bit mode.

If you prefer to change IIS from 64-bit mode to 32-bit mode, run the following commands to register 32-bit ASP.NET with IIS and enable IIS 32-bit mode:

C:\Windows\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe –i

cscript.exe C:\inetpub\AdminScripts\adsutil.vbs set W3SVC/AppPools/Enable32BitAppOnWin64 1

Configuring Verastream Web Builder

Once you have checked or changed the IIS mode, follow the steps below to configure Web Builder to match.

  1. In Web Builder, click Options > Web Builder Settings.
  2. In the left pane, select Microsoft Tools.
  3. In the .NET Framework directory field, browse to and select the appropriate directory, and then click Open > OK.
    Mode
    Microsoft .NET Framework Directory
    32-bit
    C:\Windows\Microsoft.NET\Framework\v2.0.50727
    64-bit
    C:\Windows\Microsoft.NET\Framework64\v2.0.50727
  1. Build your Verastream project.

Note: Once a Verastream project is built, it can run in either a 32- or 64-bit version of IIS. It is just the build process that needs to be configured to use the correct .NET Framework version.

Web Builder uses the .NET Framework aspnet_regiis.exe registration tool to install ASP.NET and update IIS.

Beginning in VHI version 7.5, a new installation defaults to use the 64-bit .NET Framework for the Legacy .NET Web Application project type. If you upgraded from a pre-7.5 installation, your previous setting is retained.

Cause

Verastream Host Integrator supports 64-bit platforms, as described in KB 7021532. On 64-bit Windows systems, Microsoft Internet Information Services (IIS) web server can be configured to run in 32-bit or 64-bit mode. When IIS is configured for 64-bit and you run a 32-bit application, or vice versa, you will get an error.

Both VHI Web Builder and Microsoft IIS must be configured to use the same .NET 32-bit or 64-bit mode.

Additional Information

Note: Beginning in VHI version 7.5, the HTML 5 Web Application project type, which is platform and technology independent, is available in Web Builder. The .NET and Java Web Application project types are still available but deprecated on the Legacy tab.

Legacy KB ID

This article was originally published as Attachmate Technical Note 10085.