TestParse.exe and IsapiRewrite4.ini Questions

Feb 3, 2010 at 8:30 PM

I am trying to use TestParse.exe to check my IirfGlobal.ini  and Iirf.ini files, but when I type into the dos prompt:

TestParse.exe c:\windows\system32\inetsrv\iirf   (locaton of IirfGlobal.ini) or

TestParse.exe c:\intpub\wwwroot  (location of Iirf.ini)

it adds "IsapiRewrite4.ini"  to the location and then says "done reading new config".

My questions are, first, what is IsapiRewrite4.ini.  I do not have a file by that name.

Second where do I see the results of the parse?

I am using XP and Iirf v2.0.1.15

Thanks

Coordinator
Feb 5, 2010 at 1:45 PM

I have to look into this .

There's something not quite right, because for v2.0, the name of the ini file is IIRF.ini, not IsapiRewrite4.ini.

 

Feb 8, 2010 at 6:28 AM

Thanks for looking in to it.

Please let me know when you understand what I need to do to get the parse working.

Feb 10, 2010 at 8:32 PM

For Test Purposes I created a file called IsapiRewrite4.ini, gave it some test code, and ran the parse, where should I be seeing the results of the parse?  Because I'm not seeing anyt info on the command prompt or a secondary file. 

Thanks

Coordinator
Mar 4, 2010 at 4:57 PM
Edited Mar 4, 2010 at 5:22 PM

I just tried this, and ... here's what I found.  Running TestParse.exe and specifying a directory where there is no IIRF.ini, produces this message:

c:\iirf\t\Anthony>c:\iirf\v2.0\bin\Debug\TestParse.exe . 
Trying to read config at '.\Iirf.ini'
done reading new config

The TestParse.exe tool accepts a single argument, the directory containing the file named iirf.ini. Here's the usage statement;

c:\iirf\t\sweeney>c:\iirf\v2.0\bin\Debug\TestParse.exe

TestParse.exe   (built: Mar  3 2010 22:59:21)
  A tool for validating ini-file syntax, for IIRF. It reads in
  the ini file and prints any warnings or errors found in the file.

  The version of IIRF this tool is linked with is
  'Ionic ISAPI Rewriting Filter (IIRF) 2.1.0.14 DEBUG'.
  The IIRF library was built 'Mar  3 2010 22:59:12'

usage:
  c:\iirf\v2.0\bin\Debug\TestParse.exe 

If you try to specify a specific filename to TestParse.exe, it will give you this response:

c:\iirf\t\Anthony>c:\iirf\v2.0\bin\Debug\TestParse.exe  IsapiRewrite4.ini
Trying to read config at 'IsapiRewrite4.ini\Iirf.ini'
done reading new config

Obviously, it isn't interpreting the argument as a filename, but as a directory name, as documented.

If you pass testparse the name of a directory that does contain a file by the name of IIRF.ini , testparse parses the file, as documented:

c:\iirf\t\sweeney>c:\iirf\v2.0\bin\Debug\TestParse.exe .
Trying to read config at '.\Iirf.ini'
Thu Mar 04 11:46:30 -  4916 - -------------------------------------------------------
Thu Mar 04 11:46:30 -  4916 - Ionic ISAPI Rewriting Filter (IIRF) 2.1.0.14 DEBUG
Thu Mar 04 11:46:30 -  4916 - IIRF was built on: Mar  3 2010 22:59:12
Thu Mar 04 11:46:30 -  4916 - GetLogFile: app:'None'  new log:'c:\temp\iirf.8828.log'
Thu Mar 04 11:46:30 -  4916 - ReadVdirConfig: actual log file 'c:\temp\iirf.8828.log'
Thu Mar 04 11:46:30 -  4916 - ReadVdirConfig: ini file: 'c:\iirf\t\sweeney\Iirf.ini'
Thu Mar 04 11:46:30 -  4916 - ReadVdirConfig: ini file timestamp: 2010/03/03 23:04:52 Eastern Standard Time
Thu Mar 04 11:46:30 -  4916 - ReadVdirConfig: cfg(0x01BE4FE8)
Thu Mar 04 11:46:30 -  4916 - ReadVdirConfig: LogLevel = 4
Thu Mar 04 11:46:30 -  4916 - ReadVdirConfig: pass 2
Thu Mar 04 11:46:30 -  4916 - ReadVdirConfig: c:\iirf\t\sweeney\Iirf.ini(13): IterationLimit 5
Thu Mar 04 11:46:30 -  4916 - ReadVdirConfig: c:\iirf\t\sweeney\Iirf.ini(18): RewriteRule (rule 1)  '^(/path/to/cakesite/(?!app/webroot)([^\x20]+))$'
'/path/to/cakesite/app/webroot/$2'    [I,L]
Thu Mar 04 11:46:30 -  4916 - ParseRuleModifierFlags: '[I,L]'
Thu Mar 04 11:46:30 -  4916 - ReadVdirConfig: c:\iirf\t\sweeney\Iirf.ini(21): RewriteRule (rule 3)  '^(/path/to/cakesite/(?!app/webroot)(([^\x20]+)(\x2
0([^\x20]+))))$'  '/path/to/cakesite/app/webroot/$3+$5'      [I]
Thu Mar 04 11:46:30 -  4916 - ParseRuleModifierFlags: '[I]'
Thu Mar 04 11:46:30 -  4916 - ReadVdirConfig: Done reading, found 4 rules (0 errors, 0 warnings) on 29 lines
done reading new config

If this doesn't match your experience, let me know!