IIRF.ini doesn't read

Topics: Developer Forum, Project Management Forum, User Forum
Nov 5, 2009 at 7:11 PM

Hi, All. Sorry about my english. I'm from Peru and i have a problem with the Isapi rewriter 2.0. I copied the IIRF.dll and IIRF.ini in a folder inside "windows/system32/inetrsv/IIRF". I made a web app in asp that is publicated in IIS 5.1. This app is inside into the folder called "Reporte". This folder is in the rute "Predeterminated web site". I add the Isapi filter ("IIRF.dll") to "Predeterminated web site". When i try to modify the URL in the IIRF.ini my web page don't show anything. Seems like it doesn't recognized. In the IIRF.ini. I put this: RewriteRule    ^/MGS        /login.aspx.

 

http://10.10.2.15/Reporte/login.aspx     <---   Original

http://10.10.2.15/Reporte/MGS  <--- Don't find the page ....

 

Can anybody help me?

Coordinator
Nov 5, 2009 at 7:30 PM

Yes.

No problem on your English.

First, what is the directory or folder which contains the file IIRF.ini ?   It should be the document root for the web site or web application in IIS.  The IIRF.ini file must not be located in \windows\system32\inetsrv\IIRF .  Instead it should be in the folder where you have loin.aspx.  Is that where you have it? 

OK, then... Have you inserted into your IIRF.ini file, a directive like RewriteLog c:\temp\iirf2 (and also RewriteLogLevel 3 )?   This will tell the filter to create a logfile and insert messages into that logfile as it operates.  The logfile can tell you a number of things:

  • the presence of the logfile says that the filter is loaded and operating
  • the contents of the logfile tells you what each rule is doing with each request.

Also, Have you tried to request http://10.10.2.15/iirfStatus  or http://10.10.2.15/Reporte/iirfStatus ?  What happens?

 

Nov 5, 2009 at 7:48 PM

I put the .ini and .dll into the web project directory ("C:\Inetpub\wwwroot\Reporte") and nothing happens. I think that the .ini is not been recognized. I tried to request http://10.10.2.15/iirfStatus  and http://10.10.2.15/Reporte/iirfStatus but the browser show me "can't find the page"....

Coordinator
Nov 5, 2009 at 7:55 PM

The file IIRF.dll will go into a different directory than the file IIRF.ini. 

The IIRF.dll can go into \windows\system32\inetsrv\IIRF.   The file IIRF.ini must go into the document root. 

If you think the ini is not recognized, then verify that the filter is properly loading.  There is a good document describing how to do all of this.

http://cheeso.members.winisp.net/Iirf20Help/frames.htm

You will find a good section on installation, and also on verifying and troubleshooting the installation.

Good luck!

 

Nov 5, 2009 at 8:10 PM

i was reading a last reply of you in another discussion:

Important - the v2.0 filter does not immediately start up and read the ini file, in the same way that the v1.2 filter did.  The v2.0 filter reads the ini file on the first request through the filter.  If you configure the filter, and start w3svc, then send no requests through the filter, there will be no log file.  IIRF v2.0 will not read the ini file, until a URL request comes through.  In v1.2, the IIRF logfile would just appear, as soon as w3svc was started. ,This is a difference in the way the v2.0 filter does its startup.

 

What do you mean with that?

 

Nov 5, 2009 at 8:28 PM

i put http://localhost/iirfStatus:

 

IIRF Version Ionic ISAPI Rewriting Filter (IIRF) v2.0n preview RELEASE
Built on Oct 15 2009 21:10:42
Filter DLL C:\WINDOWS\system32\inetsrv\IIRF\IIRF.dll\IIRF.dll 
Started 2009/11/05 15:04:54 (local time)
Server Ini file C:\WINDOWS\system32\inetsrv\IIRF\IirfGlobal.ini 
Last Update of Ini -- the ini file could not be opened (error=2) -- 
  #lines 0
  #warnings 0
Rewrite Engine (all sites) ON
APPL_MD_PATH /LM/W3SVC/1/Root
Ini file c:\inetpub\wwwroot\Iirf.ini
Ini file timestamp (file not found)
  Last read 2009/11/05 15:19:26 (local time)
  #Lines 0
  #Rules 0
  #Warnings 0
  #Errors 0
Log file (none)
Log level 1
Rewrite Engine ON
Remote Status Inquiry disabled
URL Decoding ON
#Requests Processed 111

 

the ini file is not found :S

Coordinator
Nov 5, 2009 at 8:39 PM

Ah, good, the filter is loaded and running.

Now you need to check the permissions.  When it says (file not found) that either means the file isn't there, or the permissions prohibit the IIS server from seeing the file.  If the problem is the latter case, then there is a section in the documentation that describes how to verify the installation.  Follow those steps to make sure IIS has the proper permissions to read the ini file(s).

About your prior question - in IIRF V2.0 the filter reads its configuration (ini) file, only at the time of the first request.  So if you start the web server and then expect to see a logfile, you won't see one.  This is because IIRF will only begin to log messages after it reads the ini file, and it doesn't read the ini file until the first request is processed .    This is a contrast to IIRF v1.2, which immediately read the ini file at startup.   I don't think you need to worry about this, though.  In that other question we were wondering if the filter was loading at all.   But it is clear fro your efforts that the filter is loading, because you got the status page.

 

Nov 6, 2009 at 8:53 PM

It's necessary that the .ini directory be c:\inetpub\wwwroot\Iirf.ini ?? Because my project is in this directory: c:\inetpub\wwwroot\Reporte\Iirf.ini. When i put the .ini file in the directory : c:\inetpub\wwwroot\Iirf.ini don't show anyhting in http://localhost/iirfStatus

APPL_MD_PATH /LM/W3SVC/1/Root
Ini file c:\inetpub\wwwroot\Iirf.ini
Ini file timestamp (file not found)
  Last read

2009/11/06 15:16:36 (local time)

Coordinator
Nov 7, 2009 at 10:45 AM
Edited Nov 13, 2009 at 6:05 AM

Are you saying that IIRF cannot read the ini file, when it is present? 

It is likely a permissions issue.  You need to permit the NetWorkService (on IIS6/7) to read the IIRF.ini file.    Check the latest doc - http://cheeso.members.winisp.net/Iirf20Help/html/153e7d87-ace3-4fd1-bead-86bd248f6087.htm 

in step 7, it tells you how to verify the permissions are correct.  IF they are incorrect, you can get "(file not found)" in the IIrfstatus panel.

To answer your question directly - the ini file goes in the root of the IIS application or IIS website. This may or may not be the same directory from which you serve web content.  For example, in your case you serve content from c:\inetpub\wwwroot\Reporte , but the IIS website root is c:\wwwroot\inetpub, and so, the IIRF.ini file must be placed in c:\inetpub\wwwroot.

 

Nov 12, 2009 at 6:39 PM

 

If i copy the ini file in c:\inetpub\wwwroot then when i try to access to http://localhost/iirfStatus appear this: This Page cannot be found ... But when i copy the ini file in the directory c:\inetpub\wwwroot\Reporte all is ok except the message

Ini file timestamp (file not found)

=(. I'm using IIS 5.1 (Windows XP). I give all the permissions and nothing. I don't know what else to do...Maybe is the IIS ...

Coordinator
Nov 13, 2009 at 6:05 AM

I understand. We covered this.

did you verify the permissions on the ini file as I suggested in my last message?  and what did you find?

Nov 13, 2009 at 2:35 PM

I found the problem =D Thanks for the patience. All was find, i write this in the ini file:

RewriteEngine ON

StatusUrl /iirfStatus

..and started to work. Now, i have a new problem =P .. This is all i have in the ini file by the moment:

 

RewriteEngine ON

StatusUrl /iirfStatus

RewriteLog  c:\temp\iirf
RewriteLogLevel 3

RewriteRule ^/MGS  /Reporte/login.aspx

 

When i try to access to login.aspx with the word MGS instead of replacing the url i get redirected to that page with the same url : /Reporte/login.aspx.

 

Coordinator
Nov 13, 2009 at 4:00 PM
gmontero wrote:

i have a new problem =P .. This is all i have in the ini file by the moment:

 

RewriteEngine ON

StatusUrl /iirfStatus

RewriteLog  c:\temp\iirf
RewriteLogLevel 3

RewriteRule ^/MGS  /Reporte/login.aspx

 

When i try to access to login.aspx with the word MGS instead of replacing the url i get redirected to that page with the same url : /Reporte/login.aspx.

 

 Check the IIRF log file. It will tell you what IIRF has done.