IIRF2.1 Configuration on Windows Server 2008 X64-Bit

Topics: Developer Forum, Project Management Forum, User Forum
Oct 16, 2011 at 3:03 AM
Edited Oct 16, 2011 at 5:51 AM

I got a problem about the IIRF2.1.Here is the thing.

My OS is Windows Server 2008 Enterprise X64 bit.

I installed IIRF2.1X64 today,when I was setting the Enable 32 Bit Applications to False in IIS7.5 ,it was working well, but there are some 32 bit applications in my .Net web project.So I have to set the Enable 32 Bit Applications to True.

After I changed it to True,then IIS7.5 reported "HTTP Error 500.0 - Internal Server Error Calling LoadLibraryEx on ISAPI filter C:\Program Files\Ionic Shade\IIRF 2.1\IIRF.dll failed".

I thought I should have to change IIRF2.1 X64 version to X86 ,but I did ,and tried many times,the IIS7.5 still reported same error after I installed IIRF2.1X86 and changed Enable 32 bit Applications to Ture.

I saw the Windows Event Logs,most of Error ID were 2268 , 2274,the details showed "... C1000000 ..."

Only installed IIRF2.1X64 and set the Enable 32 bit Applications to False ,it would be working well.but my another 32 bit applications couldn't work.So it will be a problem.

How to run IIRF2.1 on Windows Server 2008 Enterprise X64 SP1 + IIS7.5 + .Net2.0/3.5 when IIS7.5 App Pools Enable 32 bit Applications ?

Oct 16, 2011 at 7:00 PM
Edited Oct 16, 2011 at 8:10 PM

Hi Ray,

The rules for these things are pretty straightforward, and I think you understand them.  When installing an ISAPI like IIRF manually, there can be a chance you will get it mismatched at first, like installing a 64-bit DLL on a 32-bit app pool, or vice versa. The problem then is.... you may have some remnants of the old installation still present.  If you don't remove all of the "wrong" configuration you will continue to get 500 errors or ISAPI configuration errors.  

Also, if you configure an ISAPI on a server-wide basis, then configure multiple app pools, one of which is 32-bit and one of which is 64-bit, then it won't work properly - it will always be the case that one of those app pools will have an ISAPI configured that does not match. The rule is: when using multiple app pools, with different bitness, you cannot configure the ISAPI on a server-wide basis.

What I recommend is to remove all IIRF configuration information completely. You need to be careful to thoroughly remove everything - check the server-wide ISAPIs, the site-wide ISAPIs, and the vdir-specific ISAPIs. Remove every trace of IIRF from IIS.

Then, you manually configure IIRF on ONE vdir.  Be careful to get the right bitness - 32 or 64. Make sure that vdir is assigned to the app-pool that matches that bitness ("Enable 32-bit applications").  You also need to take care of all the usual things that are relevant when installing ISAPIs manually: the DLL itself has to have an ACL that permits IIS to read and execute it.  The directory that contains the ISAPI DLL needs to be readable. These things are all covered in detail in the IIRF documentation.

If you need it on multiple vdirs, then repeat that last step.


Oct 16, 2011 at 8:50 PM
Edited Oct 16, 2011 at 8:56 PM

Hi Cheeso,

Thanks for your kindly advice :)
Yes,I've tried,even installed IIRF2.1(x86) on other machine with same environment(Win Server 2008 Ent x64 + IIS7.5 + Net2.0/3.5 , IIRF2.1x86 ,Enable 32-bit Applications "True" ), but the testing result was same too.

So I verified the IIRF.DLL(x86) by Dependency Walker (X86) ,the DW notified that there were missing "GPSVC.DLL" and "IESHIMS.DLL".
Then I checked the directory "C:\Windows\System32\", there was no "IESHIMS.DLL" , but "GPSVC.dll" had already existed and protected by System.

I'm not sure whether there are some bugs in Win2008 X64-Bit, as I know,many C/C++ developers have same problem to run 32-Bit applications in Win Server 2008 X64-Bit, and often notifies "IESHIMS.DLL" or any other DLL files are not found. Did you try to compile and run IIRF2.1(x86) in Win2008 Server X64 Bit?

Maybe the problem is IIRF2.1(x86) couldn't find "GPSVC.DLL" and "IESHIMS.DLL" in Win2008 Server X64, any idea?

The IIRF2.1(x64) has been working well in Win2008 Server X64 all the time, but now I only want to make IIRF2.1(x86) run well as same as IIRF2.1(x64).
Will keep trying at free time :)



Oct 17, 2011 at 5:16 PM
Edited Oct 18, 2011 at 1:38 AM

Okay,I've solved the problems.Here are my solutions to make both IIRF2.1.2 X86 and X64 versions run well on 64-Bit Windows OS.

A)Run IIRF2.1.2(x86) on 64-Bit Windows OS.
1)Create an "IIRF32" folder in "C:\",put "IIRF.DLL"(x86 version) and "IirfGlobal.ini" into this folder.
Notice:Most of people prefer put IIRF.DLL(x86) into "C"\Windows\System32\inetsrv", if 32-Bit Windows OS,it maybe ok,but not for 64-Bit Windows OS.As MSDN said "The %windir%/System32 directory is reserved for 64-bit applications. Most DLL file names were not changed when porting to 64-bit, so 32-bit applications must use a different directory as their System32 directory.",So if you put 32-Bit Applications into "System32" folder or its subdirectory,it will not be working well under default permission settings,it is proteced by system,even don't change the permissions to reduce the security level.

2)Grant read and execute permissions for C:\IIRF32 subfile.
Especially IIS_IUSERS,IUSER,NETWORK SERVICE,IIS_WPG,it is depending on which 64-Bit Windows OS.(Windows Server,Win7,Vista), follow the IIRFv2.1 Operator's Guide and change the permissions step by step.

3)Create a testing website,put IIRF.ini into the root directory of website and also grant the permissions.Add an ISAPI Filter which named "IIRF32" and Executable Path is located "C:\IIRF32\IIRF.DLL"  for this individual website.Regarding Global Filter, Handle Mappings ,ISAPI and CGI Restrictions Settings...,Just follow the IIRFv2.1 Operator's Guide step by step.

4)Change the "Enable 32-Bit Applications" to "True" in the website App Pool Advance Settings.
Very important to make IIRF.DLL(x86) and website applications run well under 32-Bit environment.

5)Check IIRFStatus of the testing website.(like this : http://xxxxxxx/iirfstatus)
If can see "IIRF Status Report",it means IIRF2.1.2(x86) now is working on the 64-Bit Windows OS.

Notice:If checked IIRF2.1.2(X86) by Dependency Walker x86(lastest version) and found some 32-Bit DLL files were lost on the 64-Bit Windows OS,the better,download or copy them from somewhere and put them into "C:\IIRF32",grant them relavant permissions,then re-checked by Dependency Walker(x86) until it's not warning some files are not found.
Below are some 32-bit DLL files,DW(x86) often notifies when checking IIRF.DLL(x86) in 64-bit OS,FYI:

Above are the steps for how to make IIRF2.1.2(x86) run on 64-Bit Windows OS.

B)Run IIRF2.1.2(x64) on 64 Bit Windows OS
It will be easier than x86 version configuration,below are two ways to make IIRF2.1.2(X64) run on 64-Bit Windows OS:
1)Download .MSI file of IIRF2.1.2(x64),then Install it on your 64-Bit Windows OS and follow the IIRFv2.1 Operator's Guide steps to configure website,then check whether IIRFStatus is working well.
Don't forget granting permissions to IIRF relavant files ,and change "Enable 32-Bit Applications" to "False".

2)Also can follow above steps of "A)Run IIRF2.1.2(x86) on 64 Bit Windows OS.".
Just change "C:\IIRF32" to "C:\IIRF64".
Download relavant files of IIRF2.1.2(x64),and put them into "C:\IIRF64".
Change ISAPI Filter Name to "IIRF64" and change the executable path to "C:\IIRF64\IIRF.DLL" ... just make it different from IIRF2.1.2(x86).
Grant permissions for "C:\IIRF64" subfile and the IIRF.ini which in the website root directory.
Change the "Enable 32-Bit Applications" to "False" in the website App Pool Advance Settings.
Check whether IIRFStatus is working well.

Regarding 64-Bit missing files of IIRF2.1.2(x64), must be checked by Dependency Walker x64(lastest version),those missing files can be found and downloaded in Microsoft offical website or somewhere else.

Now,both IIRF2.1.2 x86 and x64 versions are working well in my 64-bit Windows OS.
Already tested in the 64-Bit of Windows Server 2008/Win7/Vista.
Good luck to everyone :)

Oct 18, 2011 at 5:13 AM

The solution is worked. but sometimes reported appliction error:

"Faulting application w3wp.exe, version 7.0.6001.18000, time stamp 0x47919413,faulting module IIRF.dll, version, time stamp 0x4e975e5e, exception code 0xc0000005, fault offset 0x00009a73, process ID 0x133c, application start time0x01cc8d2f77c1b5b6 ."



Oct 18, 2011 at 6:42 AM

May I ask a simple question, why you need IIRF on Windows 2008 with IIS 7.0, when it has its own URL rewriting and I am using that part and it works just great. I use IIS 7.0\s url rewriet with Wordpress and with my .NET application. Never had any problem and specially the fact I don't have to install any additional software.

I respect IIRF, but think it is end of road for it now with IIS 7.5 already in market.

Oct 18, 2011 at 11:25 AM

>  why you need IIRF on Windows 2008 with IIS 7.0, when it has its own URL rewriting\

no one "needs" IIRF.  People want to use it. Two years ago I announced my intention to let IIRF fade away, because of the builtin rewriter available on IIS 7 and later. Many people expressed a desire to see it continue, even though IIRF was not "needed".  so I continue to maintain it.

The IIRF documentation points out that there is a builtin rewriter on IIS7.   Despite that, people choose to use IIRF for various reasons.


Oct 18, 2011 at 11:25 AM

Ray, thanks for posting your experiences.

Peter, I don't know why it's crashing.  You will need to post the stacktrace, which is included in the IIRF log file. 

Oct 18, 2011 at 11:30 AM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.