IIRF doesn't work on IIS 6 although all the configs are ok...

Apr 21, 2010 at 5:36 PM

Hi all, we are having some trouble to make IIRF work on an IIS 6 installation. All the steps indicated in the HOWTO for manual installation are done exactly the way it is explained.

- The DLL is added on the ISAPI filters
- Read&Execute permissions are set correctly for the IUSR and the IIS_WPG on the IIRF files and on the directories that contain it.

The ISAPI loads correctly, so the DLL seems to run fine, but when we try to access http://server/iirfStatus, an error page (404) loads. In the docs it says that if there is a problem with the detection of the INI files then the IIRF Status will show a page telling that the INI was not detected. Well this doesn't happen, so there is an obvious problem with the ISAPI itself, although it shows that is running correctly.

The .ini file was first located on the IIRF directory and then was moved to a virtual directory on IIS, but it doesn't work either way.

We don't know what to do, perhaps you can give us some workaround to solve this little puzzle we have with this ISAPI.

Regards.-

Damián

 

Coordinator
Apr 21, 2010 at 8:47 PM

Did you check the IIRF log file?  does it get created?

did you check the Windows Event Log? are there events there from IIS or IIRF?

Do you have the iirfstatus enabled?   If there is an ini file, but no StatusInquiry directive in that file, the /iirfstattus url won't be enabled.

 

Apr 21, 2010 at 9:04 PM

Hi Cheeso, thanks for the answer.

There is no log file created, that's a good tip. The Windows Event Log doesn't show any errors, the ISAPI seems to load fine.

The StatusInquiry directive is specified in the INI files but nothing happens.

As you see everything regarding installation is ok, the DLL seems to be loaded by IIS without problems, but the real issue here is that it is like the INI files are not even recognized.

We got the Global configuration ini on the same directory than the dll as specified in the docs and the particular INI file on the IIS Application intended to use URL Rewriting.

If you need more details just ask, thanks a lot for your help.

 

Coordinator
Apr 21, 2010 at 9:46 PM

If there's no logfile created, and you have RewriteLog and RewriteLogLevel in your ini file, then it seems that IIRF is not loading at all.

Did you see the happy green up arrow?   As described here:

http://cheeso.members.winisp.net/Iirf20Help/html/6e3750a8-96e1-4f4b-95ad-8c6c98a45d40.htm

You will need to send at least one request into the server in order to get ISAPI filters to load, before checking for the green up arrow.

Apr 22, 2010 at 1:45 AM
Yep, the green arrow is shown, of course. I will re-check the INI instructions to see why log is not being created.
Coordinator
Apr 22, 2010 at 1:56 PM
Edited Apr 22, 2010 at 4:34 PM

Make sure you have RewriteLog and RewriteLogLevel statements in your ini.

Check the Windows Event log for evidence that IIRF tried and failed to create the log file, like if there was a access denied error when trying to create the log file.

 

Apr 23, 2010 at 4:35 PM

I'm having the same problem, so perhaps we can help each other out. Here's everything I have configured.

1. .dll is at w:\inetpub\bin\

2. Effective Network Service permissions are: Traverse, List Folder/Read Data, Read Attributes, Read Extended Attributes, Read Permissions

3. The contents of my IirfGlobal.ini:

StatusInquiry ON

4. The contents of the IIRF.ini file in my IIS application:

StatusInquiry ON
RewriteLog w:\inetpub\bin
RewriteLogLevel 5

5. I have the happy green up arrow in my ISAPI Filters tab in the IIS properties, with the filter pointing to "W:\inetpub\bin\IIRF.dll" with a "Low" priority

6. I've configured the .iirf extension for "W:\inetpub\bin\IIRF.dll" and made sure to uncheck "Verify file exists"

I'm not getting any logs in w:\inetpub\bin, and I'm not seeing any errors in the Windows event log to show me that things aren't being loaded.

I'm running all of this on Windows Server 2003 and ColdFusion 9. I'm at a loss considering the fact that I'm not getting *any* output anywhere to show me why things aren't working.

Thanks,

 

Dan

Apr 23, 2010 at 7:59 PM
Well finally we managed to figure out what was going wrong. Logging was working just fine, the problem was with the INI file expressions. IIRF Status didn't show because instructions that were followed for installation were for the beta version (2.1) and not for the latest stable we have 2.0.xx, we corrected the INI file and everything seemed to run just ok, HOWEVER, rewriting was not working, although the INI files were loaded successfully. Logs just said that everything goes fine and that no rewrite was done, (?) odd.

After revising again and again the syntax on the IIRF.ini we found that rewriting was not taking place because we were missing the escape character '|' at the end of the url.

This is the correct expression:
RewriteRule ^/friendly-url-1/.*/.*/.*/.*/|\.html$

The wrong expression:
RewriteRule ^/friendly-url-1/.*/.*/.*/.*/\.html$

Just a silly error. Now the current problem is that variables are not being sent after rewriting, obviously is another syntax issue so, we are going to check up.

Here is the IIRF.ini:

RewriteLogLevel 5
RewriteLog d:\IIRF\iirfLogs\iirf
RewriteBase ON

StatusUrl /iirfStatus
RewriteCond %{HTTP_URL} (/|\.htm|\.php|\.html|/[^.]*)$ [I]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^/friendly-url-1/.*/.*/.*/.*/|\.html$ /site/test2.php?var1=$1&var2=$2&var3=$3 [U,L]

If someone has some clue about it, any help would appreciated.

danshort, why don't you try using another directory for IIRF logs (just use RewriteLog C:\IIRF for example)? If logs are not being written perhaps you are missing some permissions on that particular directory, just try on another one to see if it works then.

On Fri, Apr 23, 2010 at 1:35 PM, danshort <notifications@codeplex.com> wrote:

From: danshort

I'm having the same problem, so perhaps we can help each other out. Here's everything I have configured.

1. .dll is at w:\inetpub\bin\

2. Effective Network Service permissions are: Traverse, List Folder/Read Data, Read Attributes, Read Extended Attributes, Read Permissions

3. The contents of my IirfGlobal.ini:

StatusInquiry ON

4. The contents of the IIRF.ini file in my IIS application:

StatusInquiry ON
RewriteLog w:\inetpub\bin
RewriteLogLevel 5

5. I have the happy green up arrow in my ISAPI Filters tab in the IIS properties, with the filter pointing to "W:\inetpub\bin\IIRF.dll" with a "Low" priority

6. I've configured the .iirf extension for "W:\inetpub\bin\IIRF.dll" and made sure to uncheck "Verify file exists"

I'm not getting any logs in w:\inetpub\bin, and I'm not seeing any errors in the Windows event log to show me that things aren't being loaded.

I'm running all of this on Windows Server 2003 and ColdFusion 9. I'm at a loss considering the fact that I'm not getting *any* output anywhere to show me why things aren't working.

Thanks,

 

Dan

Read the full discussion online.

To add a post to this discussion, reply to this email (IIRF@discussions.codeplex.com)

To start a new discussion for this project, email IIRF@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on CodePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com


Apr 23, 2010 at 8:07 PM

Changing the log directory has no effect, and I can't even view the /iirfStatus page... which tells me it's not catching anything at all.

 

Dan

 

Coordinator
Apr 24, 2010 at 9:06 AM

Ah, what version of the DLL are you using, Dan?

With the latest version, if you don't see /iirfStatus, then it is not installed properly.  

See, if it can't find the ini, then /iirfstatus is automatically enabled. If it does find your ini file, then it will have /iirfstatus enabled.  You're saying it's not enabled. Which means ...
IIRF is not being loaded.

Apr 24, 2010 at 1:35 PM

The version of the DLL is listed as 2.0.1.15.

So how do I get it loaded then? Checking in IIS, it's showing the green up arrow on my site. I've deleted both the IirfGlobal and IIRF.ini files, just to make sure I didn't have a badly configured one, and I still get a 404 on the /iirfStatus URL.

Site Properties: http://dl.dropbox.com/u/2586403/IIRF/SiteProperties.png

Site Configuration: http://dl.dropbox.com/u/2586403/IIRF/Configuration.png

DLL Security Settings: http://dl.dropbox.com/u/2586403/IIRF/Security.png

Thanks,

Dan

Coordinator
Apr 26, 2010 at 3:52 PM

Dan,

There's a section in the documentation covering the verification of an install, and troubleshooting.

/iirfstatus is one thing to check.  sounds like you are doing that and not finding joy.

another thing to check: the presence of a log file. You will get this on successful load only if there is a RewriteLog and RewriteLogLevel directive in your IIRf.ini file.

the green arrow indicates that the filter IS loading.  I can't explain why it would be loading and not working.

 

I don't know why you're seeing the behavior you're seeing.  When things don't make sense, usually one of the assumptions is wrong.

 

 

Apr 26, 2010 at 5:57 PM
> There's a section in the documentation covering the verification of an
> install, and troubleshooting.

Yep, I've been through that at least a dozen times...

1. The filter is loading
2. I've specified (and not specified) the StatusInquiry directive with
no change in behavior
3. There are no entries in the windows even viewer to indicate a problem
4. I tried running TestDriver and TestParse, and they were both
looking for IsapiRewrite4.ini. I changed the name of my IIRF.ini to
IsapiRewrite4.ini and got no errors from TestDriver or TestParse, but
I /iirfStatus didn't work and there were still no logs.
5. I restarted IIS after each step to make sure that any new config
information was brought in.

W:\>cd inetpub

W:\inetpub>cd bin

W:\inetpub\bin>TestParse w:\inetpub\wwwroot\site-drive.com\cms
Trying to read config at 'w:\inetpub\wwwroot\site-drive.com\cms\IsapiRewrite4.in
i'
done reading new config

W:\inetpub\bin>TestParse w:\inetpub\wwwroot\site-drive.com\cms
Trying to read config at 'w:\inetpub\wwwroot\site-drive.com\cms\IsapiRewrite4.in
i'
Mon Apr 26 12:49:51 - 25144 - --------------------------------------------------
-----
Mon Apr 26 12:49:51 - 25144 - Ionic ISAPI Rewriting Filter (IIRF) 2.0.1.15 RELEA
SE
Mon Apr 26 12:49:51 - 25144 - IIRF was built on: Dec 3 2009 11:49:15
Mon Apr 26 12:49:51 - 25144 - GetLogFile: app:'None' new log:'w:\inetpub\bin\.5
412.log'
Mon Apr 26 12:49:51 - 25144 - ReadSiteConfig: actual log file 'w:\inetpub\bin\.5
412.log'
Mon Apr 26 12:49:51 - 25144 - ReadSiteConfig: ini file: 'w:\inetpub\wwwroot\site
-drive.com\cms\IsapiRewrite4.ini'
Mon Apr 26 12:49:51 - 25144 - ReadSiteConfig: ini file timestamp: 2010/04/26 12:
41:43 Central Daylight Time
Mon Apr 26 12:49:51 - 25144 - ReadSiteConfig: line 2: LogLevel = 2
Mon Apr 26 12:49:51 - 25144 - ReadSiteConfig: Done reading, found 0 rules (0 err
ors, 0 warnings) on 3 lines
done reading new config

> /iirfstatus is one thing to check.  sounds like you are doing that and not
> finding joy.
>
> another thing to check: the presence of a log file. You will get this on
> successful load only if there is a RewriteLog and RewriteLogLevel directive
> in your IIRf.ini file.

I added the following to my IIRF.ini file in the site:

RewriteLog w:\inetpub\bin\
RewriteLogLevel 2

And I don't get any log in that directory.

> the green arrow indicates that the filter IS loading.  I can't explain why
> it would be loading and not working.
>
> I don't know why you're seeing the behavior you're seeing.  When things
> don't make sense, usually one of the assumptions is wrong.

I even set the site to run in its own Application Pool to make sure it
wasn't going to conflict with anything else on the server....

Agreed on the assumptions, unfortunately you and I must be making the
exact same assumptions, since my screenshots apparently didn't reveal
any anomalies... As much as I hate to, looks like I'm going to need to
look for another solution. I've been trying to get this to work for a
week and haven't seem to hit the magic button yet...

Dan
Coordinator
Apr 26, 2010 at 7:04 PM

I'm not sure how you've verified that the filter isn't working.  So far  you seem to have focused on the /iirfstatus URL, which is nice to have but obviously not the main reason you install a rewriting filter.

Have you configured a simple rule in the ini file, and tried running a request through the server?  I may be wrong but it seems like you dead-ended at "I can't get /iirfstatus to work".   Try a URL other than /iirfstatus , to understand what's going wrong.   Make sure you have a rule in the ini file.

Also I'm not sure of the version you're using.  Try v2.1 if you are on v2.0.  The main changes in v2.1 are in ProxyPass, which was not usable or correct in v2.0.  But there were some changes also regarding the /iirfstatus handling, and in the TestParse and TestDriver, I think, to fix the problem where those tools look for the ini file by an outdated name.  v2.1 should be a very safe upgrade in any case.  Worth trying even to see if it works.

 

Apr 26, 2010 at 7:35 PM
Well damnit... that worked... I added the following rule:

RewriteRule ^/about/ /index.cfm/about/ [I,U]

And that's working... it's also logging. So yes, I was stuck on
iirfStatus because the docs say it should work before anything else
does. So I guess then the next question is, why isn't the iirfStatus
working? I'm using 2.0.15...

Dan

On Mon, Apr 26, 2010 at 2:05 PM, [email removed] wrote:
> From: Cheeso
>
> I'm not sure how you've verified that the filter isn't working.  So far  you
> seem to have focused on the /iirfstatus URL, which is nice to have but
> obviously not the main reason you install a rewriting filter.
>
> Have you configured a simple rule in the ini file, and tried running a
> request through the server?  I may be wrong but it seems like you dead-ended
> at "I can't get /iirfstatus to work".   Try a URL other than /iirfstatus ,
> to understand what's going wrong.   Make sure you have a rule in the ini
> file.
>
> Also I'm not sure of the version you're using.  Try v2.1 if you are on
> v2.0.  The main changes in v2.1 are in ProxyPass, which was not usable or
> correct in v2.0.  But there were some changes also regarding the /iirfstatus
> handling, and in the TestParse and TestDriver, I think, to fix the problem
> where those tools look for the ini file by an outdated name.  v2.1 should be
> a very safe upgrade in any case.  Worth trying even to see if it works.
>
>
>
> Read the full discussion online.
>
> To add a post to this discussion, reply to this email
> ([email removed])
>
> To start a new discussion for this project, email
> [email removed]
>
> You are receiving this email because you subscribed to this discussion on
> CodePlex. You can unsubscribe on CodePlex.com.
>
> Please note: Images and attachments will be removed from emails. Any posts
> to this discussion will also be available online at CodePlex.com
Coordinator
Apr 26, 2010 at 9:36 PM

Dan, I don't know why iirfstatus wasn't working.

Maybe I missed testing the case where there's an ini file with no rules.    I'll have to look.

I'm sorry you had so much trouble. Glad it's working now though.

Coordinator
Apr 26, 2010 at 9:38 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.