Following are typical problems user can face when failing to load ISAPI Filter 64bit dll with IIS 6.0 or 7.0:
1. In order for ISAPI Filter to work with IIS7 you need to grant the DLL folder access rights of the user running Web Service (usually it’s IIS_IUSRS).
2. You might miss dependencies of the DLL. Starting from VS2005 all runtime libraries are resided in C:\Windows\winxs\...; all required libraries, their architecture and versions are listed in Manifest file (it’s a regular text file). You need to make sure that all listed libraries exist under C:\Windows\winxs folder. There can be more than one version of each library. The DLL might only Microsoft.VCxx.CRT (msvcmxx.dll, msvcpxx.dll, msvcrxx.dll), where xx is 7.0 for VS2002, 8.0 – VS2005, 9.0 – VS2008, 10.0 – VS2010. For Debug mode compilation there are separate libraries - Microsoft.VCx.DebugCRT.
3. If DLL accesses the registry, relevant registry branch needs to have same user access rights as a user running Web Service (usually IIS_IUSRS)
To switch IIS6 between 32 and 64 bit applications:
This will disable running 32 bit applications and will run 64 bit
cscript %SYSTEMDRIVE%\inetpub\adminscripts\adsutil.vbs SET W3SVC/AppPools/Enable32bitAppOnWin64 0
This will disable running 64 bit applications and will run 32 bit
cscript %SYSTEMDRIVE%\inetpub\adminscripts\adsutil.vbs SET W3SVC/AppPools/Enable32bitAppOnWin64 1
this will install .NET 64 to IIS
%SYSTEMROOT%\Microsoft.NET\Framework64\v2.0.50727\aspnet_regiis.exe –i
this will install .NET 32 to IIS
%SYSTEMROOT%\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe –i
In IIS7 it can be done same way, but this configuration is available in IIS administration GUI also.