IIS 6.0 and ASP.NET 2.0 on Windows Server 2003 x64

Today, I ran into an interesting issue trying to run an ASP.NET 2.0 web application through IIS 6.0. Usually, it isn’t a problem, but since the host machine is running 64 bit windows, some issues were encountered.

The first symptom I ran into was a 503 Service Unavailable response when accessing the website from a browser. Checking the IIS error logs showed a _AppOffline DefaultAppPool _error description, not very helpful. The event log had a better message:

ISAPI Filter 'C:\Program Files (x86)\Common Files\Microsoft Shared\Web Server Extensions\50\bin\fpexedll.dll' could not be loaded due to a configuration problem. The current configuration only supports loading images built for a x86 processor architecture. The data field contains the error number. To learn more about this issue, including how to troubleshooting this kind of processor architecture mismatch error, see http://go.microsoft.com/fwlink/?LinkId=29349.

Googling found two related articles, one on the 503, and another on the ISAPI issue.

The solution recommended running the following command: CSCRIPT %SYSTEMDRIVE%\Inetpub\AdminScripts\adsutil.vbs SET W3SVC/AppPools/Enable32bitAppOnWin64 1

When this command was ran, nothing was fixed. I tried running the inverse, and setting to only allow 64 bit applications, and it worked. CSCRIPT %SYSTEMDRIVE%\Inetpub\AdminScripts\adsutil.vbs SET W3SVC/AppPools/Enable32bitAppOnWin64 0