1
Vote

IIRF and IIS8

description

Do you support IIS8? I haven't found anything in documentation stating the contrary.
If you do, do you know what could cause the following problem:

Fri Dec 06 10:35:19 - 1896 - -------------------------------------------------------
Fri Dec 06 10:35:19 - 1896 - Ionic ISAPI Rewriting Filter (IIRF) 2.1.2.3 x64 RELEASE
Fri Dec 06 10:35:19 - 1896 - IIRF was built on: Nov 11 2011 07:39:55
Fri Dec 06 10:35:19 - 1896 - Cached: DLL_PROCESS_ATTACH
Fri Dec 06 10:35:19 - 1896 - Cached: Process ID: 2052
Fri Dec 06 10:35:19 - 1896 - Cached: ReadServerConfig: C:\WebSite\urlrewriter\IirfGlobal.ini(23): Filter Priority is now: HIGH (0x80000)
Fri Dec 06 10:35:19 - 1896 - Cached: ReadServerConfig: C:\WebSite\urlrewriter\IirfGlobal.ini(46): NotifyLog setting is now: OFF
Fri Dec 06 10:35:19 - 1896 - Cached: ReadServerConfig: C:\WebSite\urlrewriter\IirfGlobal.ini(63): RewriteEngine setting is now: ON
Fri Dec 06 10:35:19 - 1896 - Cached: DLL_PROCESS_ATTACH - complete
Fri Dec 06 10:35:19 - 1896 - Cached: GetFilterVersion
Fri Dec 06 10:35:19 - 1896 - GetLogFile: app:'/LM/W3SVC/1/ROOT/workcenter' new log:'C:\WebSite\Log\iirfWorkcenter.out.2052.log'
Fri Dec 06 10:35:19 - 1896 - ReadVdirConfig: actual log file 'C:\WebSite\Log\iirfWorkcenter.out.2052.log'
Fri Dec 06 10:35:19 - 1896 - ReadVdirConfig: ini file: 'C:\WebSite\Iirf.ini'
Fri Dec 06 10:35:19 - 1896 - ReadVdirConfig: ini file timestamp: 2013/12/06 09:28:16 Pacific Standard Time
Fri Dec 06 10:35:19 - 1896 - ReadVdirConfig: cfg(0x529E8E90)
Fri Dec 06 10:35:19 - 1896 - ReadVdirConfig: LogLevel = 4
Fri Dec 06 10:35:19 - 1896 - ReadVdirConfig: pass 2
Fri Dec 06 10:35:19 - 1896 - ReadVdirConfig: C:\WebSite\Iirf.ini(6): StatusInquiry ON (--) (--)
Fri Dec 06 10:35:19 - 1896 - ReadVdirConfig: C:\WebSite\Iirf.ini(6): IIRF Status Inquiry is enabled at path '/iirfStatus' for local requests only.
Fri Dec 06 10:35:19 - 1896 - ReadVdirConfig: C:\WebSite\Iirf.ini(7): RewriteEngine will be enabled.
Fri Dec 06 10:35:19 - 1896 - ReadVdirConfig: C:\WebSite\Iirf.ini(8): IterationLimit 0
Fri Dec 06 10:35:19 - 1896 - ReadVdirConfig: C:\WebSite\Iirf.ini(9): UrlDecoding will be disabled.
Fri Dec 06 10:35:19 - 1896 - ReadVdirConfig: C:\WebSite\Iirf.ini(11): RedirectRule (rule 1) '^/workcenter$' '/workcenter/tmtrack.dll?shell=swc' [I]
Fri Dec 06 10:35:19 - 1896 - ParseRuleModifierFlags: '[I]'
Fri Dec 06 10:35:19 - 1896 - ReadVdirConfig: C:\WebSite\Iirf.ini(11): INFO: the Redirect target does not include an http(s):// scheme.
Fri Dec 06 10:35:19 - 1896 - ReadVdirConfig: The rule will Redirect to a target on the local machine
Fri Dec 06 10:35:19 - 1896 - ReadVdirConfig: C:\WebSite\Iirf.ini(12): RedirectRule (rule 2) '^/workcenter/$' '/workcenter/tmtrack.dll?shell=swc' [I]
Fri Dec 06 10:35:19 - 1896 - ParseRuleModifierFlags: '[I]'
Fri Dec 06 10:35:19 - 1896 - ReadVdirConfig: C:\WebSite\Iirf.ini(12): INFO: the Redirect target does not include an http(s):// scheme.
Fri Dec 06 10:35:19 - 1896 - ReadVdirConfig: The rule will Redirect to a target on the local machine
Fri Dec 06 10:35:19 - 1896 - CountIniLines: ini file C:\WebSite\Iirf.ini (13 lines)
Fri Dec 06 10:35:19 - 1896 - ReadVdirConfig: Done reading INI for vdir(/workcenter), found 2 rules (0 errors, 0 warnings) on 13 lines, in 1 modules
Fri Dec 06 10:35:19 - 1896 - GetVdirConfig: Obtain vdir '/LM/W3SVC/1/ROOT/workcenter' (era=0) (rc=1) (Expired=0) (ptr=0x529E8E90)...
Fri Dec 06 10:35:19 - 1896 - HttpFilterProc: SF_NOTIFY_URL_MAP
Fri Dec 06 10:35:19 - 1896 - HttpFilterProc: cfg= 0x529E8E90
Fri Dec 06 10:35:19 - 1896 - HttpFilterProc: SF_NOTIFY_AUTH_COMPLETE
Fri Dec 06 10:35:19 - 1896 - DoRewrites
Fri Dec 06 10:35:19 - 1896 - GetHeader_AutoFree: 'url' = '/workcenter'
Fri Dec 06 10:35:19 - 1896 - GetHeader_AutoFree: 'method' = 'GET'
Fri Dec 06 10:35:19 - 1896 - DoRewrites: Url: '/workcenter'
Fri Dec 06 10:35:19 - 1896 - EvaluateRules: depth=0
Fri Dec 06 10:35:19 - 1896 - EvaluateRules: no RewriteBase
Fri Dec 06 10:35:19 - 1896 - EvaluateRules: Rule 1: pattern: ^/workcenter$ subject: /workcenter
Fri Dec 06 10:35:19 - 1896 - EvaluateRules: Rule 1: 1 match
Fri Dec 06 10:35:19 - 1896 - ReplaceServerVariables: alloc 34 bytes
Fri Dec 06 10:35:19 - 1896 - ReplaceServerVariables: in='/workcenter/tmtrack.dll?shell=swc' out='/workcenter/tmtrack.dll?shell=swc'
Fri Dec 06 10:35:19 - 1896 - GenerateReplacementString: alloc 35 bytes
Fri Dec 06 10:35:19 - 1896 - ApplyUrlEncoding: in '/workcenter/tmtrack.dll?shell=swc'
Fri Dec 06 10:35:19 - 1896 - ApplyUrlEncoding: out '/workcenter/tmtrack.dll?shell=swc'
Fri Dec 06 10:35:19 - 1896 - GenerateReplacementString: result '/workcenter/tmtrack.dll?shell=swc'
Fri Dec 06 10:35:19 - 1896 - EvaluateRules: Result (length 33): /workcenter/tmtrack.dll?shell=swc
Fri Dec 06 10:35:19 - 1896 - EvaluateRules: returning 1302
Fri Dec 06 10:35:19 - 1896 - DoRewrites: Redirect (code=302) Url to: '/workcenter/tmtrack.dll?shell=swc'
Fri Dec 06 10:35:19 - 1896 - EXCEPTION
Fri Dec 06 10:35:19 - 1896 - SymInit: Symbol-SearchPath: 'C:\WebSite\urlrewriter\;.;c:\windows\system32\inetsrv;c:\windows\system32\inetsrv;C:\Windows;C:\Windows\system32;SRVC:\websymbolshttp://msdl.microsoft.com/download/symbols;', symOptions: 530, UserName: 'DefaultAppPool'
Fri Dec 06 10:35:19 - 1896 - OS-Version: 6.2.9200 () 0x110-0x3
Fri Dec 06 10:35:20 - 1896 - Stack trace:
000007FABADB9D7B module(filter): (filename not available): RegisterModule
000007FAB482C739 module(iirf): (filename not available): Iirf_GetVersion
000007FAB482CA33 module(iirf): (filename not available): HttpFilterProc
000007FABADB15E4 module(filter): (filename not available): (function-name not available)
000007FABADB13F4 module(filter): (filename not available): (function-name not available)
000007FABADB11B0 module(filter): (filename not available): (function-name not available)
000007FABC4126E2 module(iiscore): (filename not available): (function-name not available)
000007FABC4134A8 module(iiscore): (filename not available): (function-name not available)
000007FABC41AF06 module(iiscore): (filename not available): (function-name not available)
000007FABC417395 module(iiscore): (filename not available): (function-name not available)
000007FABC41BCEB module(iiscore): (filename not available): (function-name not available)
000007FAB3BD28A5 module(webengine4): (filename not available): MgdIndicateCompletion
000007FAAD1F9E0B module(System.Web.ni): (filename not available): (function-name not available)
000007FAAD14E967 module(System.Web.ni): (filename not available): (function-name not available)
000007FAAD14E2E2 module(System.Web.ni): (filename not available): (function-name not available)
000007FAAD8AB781 module(System.Web.ni): (filename not available): (function-name not available)
000007FAC381D743 module(clr): (filename not available): GetPrivateContextsPerfCounters
000007FAC36E87FC module(clr): (filename not available): GetMetaDataInternalInterface
000007FAC3826A7E module(clr): (filename not available): GetPrivateContextsPerfCounters
000007FAC36E8785 module(clr): (filename not available): GetMetaDataInternalInterface
000007FAC381D6ED module(clr): (filename not available): GetPrivateContextsPerfCounters
000007FAB3BD1D92 module(webengine4): (filename not available): MgdGetCurrentNotificationInfo
000007FAB3BD22D6 module(webengine4): (filename not available): PerfDecrementGlobalCounter
000007FAC38262DA module(clr): (filename not available): GetPrivateContextsPerfCounters
000007FAC38256EF module(clr): (filename not available): GetPrivateContextsPerfCounters
000007FAC38255F3 module(clr): (filename not available): GetPrivateContextsPerfCounters
000007FAC36ED5B6 module(clr): (filename not available): GetMetaDataInternalInterface
000007FAC97B1832 module(KERNEL32): (filename not available): BaseThreadInitThunk
000007FACBE6D609 module(ntdll): (filename not available): RtlUserThreadStart
000007FACBE6D609 module(ntdll): (filename not available): RtlUserThreadStart

http://localhost/iirfstatus shows no errors when I run it right after IIS restart.
However, when I try to access the url I need to rewrite, I'm getting HTTP 503 error everywhere, including iirfstatus url.

Is there anything I can use to troubleshoot it better?

comments

fixyourshoes wrote Dec 24, 2013 at 4:28 PM

Still don't know what is the problem.
It happens only to RedirectRule, and the exception is thrown in the following call:

Rewriter.c -> DoRewrites

pfc->ServerSupportFunction (pfc,
                                    SF_REQ_SEND_RESPONSE_HEADER,
                                    (PVOID) codestring,  // eg, "302"
                                    (DWORD) buf,         // headers to add
                                    0);
The function specifies what headers in request should be attached in response.
But I have no clue what exactly is wrong with it, it works fine with IIS7

fixyourshoes wrote Jan 9, 2014 at 12:48 PM

If I change (DWORD) buf -> (ULONG_PTR) buf, it fixes the issue.
The change is in Rewriter.c -> DoRewrites, redirection section, pfc->ServerSupportFunction( pfc, SF_REQ_SEND_RESPONSE_HEADER, (PVOID) codestring, (ULONG_PTR) buf, 0);

Mumfrey wrote Nov 5, 2014 at 2:03 PM

@fixyourshoes you are literally my hero. I was tearing my hair out trying to get IIRF to work under Windows 2012 without the application pool spuriously crashing and your suggested fix worked flawlessly. I wish there was some way we could get cheeso to make a new build with this tiny fix because I can't imagine how many people are struggling in vain and haven't come across this suggestion.

Biggest thanks, I literally just made a codeplex account in order to post this.

fixyourshoes wrote Nov 5, 2014 at 2:35 PM

@Mumfrey I'm glad it helped

Maf1300 wrote Mar 25, 2015 at 4:02 PM

@fixyourshoes you are my hero too. :) Your fix works great on Windows Server 2012 R2 and IIS 8.5.

I couldn't open project with Visual Studio 2008 and had to use nmake.exe to build new dll file ... read Readme.txt in v2.x folder of the source code and make changes to makefile in the same folder - you will have to change path for VC and PSDK; you will also have to put your VC\bin path into your Environment Variables path.

I will not have to struggle with Microsoft URL Rewrite Module. It works OK, but I couldn't make it work with txt files with regular expressions in them. They only work with xml config files, but there's a limit for file size.

Thanks again, fixyourshoes.

NPires wrote Jul 5, 2015 at 4:27 PM

Any chance anyone can make this new DLL available, I really need it as I just moved from IIS 7.5 to IIS 8.5 and all redirects stopped working. Appreciated. Thanks.