We're slowly migrating from 32-bit Windows to 64-bit Windows. To prepare, we're rolling out 2003 Standard edition, 64-bit. Since our applications are still compiled 32-bit until we migrate off .NET 1.1, we have set IIS 6 to run 32-bit application pools by running:
cscript %SystemDrive%\inetpub\AdminScripts\adsutil.vbs set w3svc/AppPools/Enable32bitAppOnWin64 1and restarting IIS.
All seemed well. Mapping .NET 1.1 (which only runs in 32-bit mode) worked fine:
%SYSTEMROOT%\Microsoft.NET\Framework\v1.1.4322\aspnet_regiis.exe -iHowever, any attempt to surf our BITS-enabled IIS site resulted in error code 500. Disabling IE's unhelpful "Friendly Error Messages" showed me the message "Module Not Found".
So, I ran filemon to see what files were in use as I tried to hit the website. What I noticed was w3wp.exe, one of the worker processes of IIS6, was trying to open "c:\windows\SysWOW64\bitssrv.dll" (the BITS ISAPI dll). To confirm my settings, the "BITS Webserver Extensions" setting in my IIS6 "Webserver Extensions" pane indeed pointed to "c:\windows\system32\bitssrv.dll". In the website properties, we have a script-mapping to direct all requests to the ISAPI dll, and it too pointed to "c:\windows\system32\bitssrv.dll"
Since we set IIS to use 32-bit application pools, Windows is "helpfully" translating calls for the system folder (oddly named "system32" on Windows 64-bit) to the 32-bit system folder, named SysWOW64 (does anyone know why they didn't just leave "system32" as the 32-bit folder and make a new one "system64"?).
You can actually see this in action by running a 32-bit file manager (like TotalCommander) and see that attempts to surf c:\windows\system32 show different results between 32-bit and 64-bit apps.
This struck me as odd because there is no bitssrv.dll in the SysWOW64 folder, only in the system32 folder (meaning there is no 32-bit BITS dll, just a 64-bit one). To be sure, I looked on the Windows Server 2003 x64 CD, SP1 CD, and SP2 CD for a 32-bit version of the BITS dll. Apparently, there is no 32-bit version of the ISAPI filter for a 64-bit OS.
I copied the bitssrv.dll from a 32-bit Windows 2003 server to this server's "C:\Windows\SysWOW64\" folder and restarted IIS. Voila, BITS functioned properly.
I assume this is all by design, but it was annoying to discover. What's even more annoying is that I'll need to manually update this file for any BITS-related security patches.
1 comments:
Hi Aaron,
i spend hours and hours to fix this issue. BITS won't work on w2003 64 Bit with Enable32bitAppOnWin64 1.
Tahnk you for this tip to fix that.
Ivan
Post a Comment