Service not accessible when “Enable 32-Bit Applica

2019-04-02 22:24发布

问题:

On the development server I use IIS Veresion 7.5.7600.16385

And a Service compiled for .Net 4.5.1, Any CPU

The service works fine on the development server (Win Server 2008 R2).

On the client's production server however I get strange problems:

(Same IIS Version, same OS version)

As soon as I set "Enable 32-Bit Applications" the service's URL is no longer accessible in a browser. (Page not available)

(I need the 32Bit mode because the service uses some legacy COM components)

What may cause this problems?

Any ideas, hints, suggestions?


Edit

More Details:

The "IIS Worker Process" is running as "w3wp.exe *32"

There is a ClickOnce Installation in the same Application Pool which behaves the same: works ok in 64 bit, not accessible if 32Bit set to true.

In fact all pages of this 32Bit App-Pool produce the same behaviour (HTTP 500) page not found.

回答1:

Step 1: Enable Logging in IIS

In Order to enable better error messages and log files in IIS you must install two Features:

Control Panel->Programs and Features->Turn Windows features on or off

You'll need two features installed:

WebServer->Common Http Features->HTTP Errors

WebServer-> Health an Diagnostics->HTTP Logging

Step 2: Analyse Error Messages

With HTTP Errors enabled I got a more verbose message when I accessed any page in the 32Bit App Pool:

HTTP Error 500.19

DynamicCompressionModule

ErrorCode 0x8007007e

Step 3: Decode Error Code

I used Microsoft Exchange Server Error Code Look-up to convert the ErrorCode into something more useful:

C:\Users\combyte>err 0x8007007e

as an HRESULT: Severity: FAILURE (1), Facility: 0x7, Code 0x7e

...

ERROR_MOD_NOT_FOUND winerror.h

The specified module could not be found.

It turned out, that a specific DLL was not installed. In my case the installation of WSUS (Windows Server Update Services) installed a 64Bit version of DynamicCompressionModule (C:\Windows\system32\inetsrv\suscomp.dll) only.

Solution1

Remove/Disable the XPress compression scheme from the IIS configuration (for all pages/app-pools) using this command:

%windir%\system32\inetsrv\appcmd.exe set config -section:system.webServer/httpCompression /-[name='xpress']

Solution2

Disable loading of the xpress module in IIS config file C:\Windows\System32\inetsrv\config\ApplicationHost.config for 32Bit App-Pools:

add attribute preCondition="bitness64" to the xpress module in section <modules>:

<add name="DynamicCompressionModule" lockItem="true" preCondition="bitness64" />

Solution3

Install the 32Bit version of suscomp.dll(from a 32 Bit Installation of WSUS) into %windir%\SYSWOW64\inetsrv\