As sometime happens, while setting up a repro for a customer (I’m working with him on a completely different problem) I wanted to test my sample code on a 32 bit w3wp.exe instance (I am running Windows 2008 x64); nothing easier on IIS7, just create a new application pool and change its “Enable 32.Bit Applications” property to true in IIS Manager and you’re done:
But when I tried to run my code, I got this a “HTTP Error 503. The service is unavailable” message and the application pool was stopped. The Application event log contains a few entries like the following:
Log Name: Application
Date: 02/02/2009 14.19.05
Event ID: 2280
Task Category: None
Description: The Module DLL C:\Windows\system32\RpcProxy\RpcProxy.dll failed to load. The data is the error.
I also got some of this warning:
Log Name: System
Date: 03/02/2009 20.42.55
Event ID: 5139
Task Category: None
Description: A listener channel for protocol 'http' in worker process '4580' serving application pool '32bitPool' reported a listener channel failure. The data field contains the error number
If I changed the application pool back to a 64 bit process, everything worked fine again.
I save you the tedious details, but the point is: RpcProxy.dll is 64 bit, obviously it cannot by loaded into a 32 bit process…
As I usually do as part of my “learning experience”, I installed all the available roles for IIS7 and one of them is “RPC over HTTP Proxy”:
This installs RpcProxy.dll (and other files) and changes applicationHost.config adding a new global module:
<add name="PasswordExpiryModule" image="C:\Windows\system32\RpcProxy\RpcProxy.dll" />
How can I prevent IIS from loading it? Easy, just add the preCondition=”bitness64” attribute as follows:
<add name="PasswordExpiryModule" image="C:\Windows\system32\RpcProxy\RpcProxy.dll" preCondition="bitness64" />
Bingo, I finally have my 32 bit worker process up and running!
Quote of the day:
We are born charming, fresh and spontaneous and must be civilized before we are fit to participate in society – Judith Martin