Attention! Helicon Tech Blog has moved to www.helicontech.com/articles/

Friday, October 30, 2009

From the inside: ISAPI_Rewrite x64 installation on Windows 2008 Server x64

Installation of ISAPI_Rewrite x64 on Windows 2008 Server x64 may seem a trivial task and it really is of that kind, but nevertheless we'd like to show you the steps installer is making so you could fix possible (though unlikely) problems.

First of all ISAPI_Rewrite installer ensures that ISAPI Filters and ISAPI Extensions components are installed in IIS.

This done installation starts (proper installation package may be downloaded here; it's called ISAPI_Rewrite3_00xx_x64.msi).
Then proxy handlers are registered in Handler Mappings snap-in.

Two records must be added: Helicon Proxy_32 and Helicon Proxy_x64:

After that ISAPI_Rewrite filters are registered in ISAPI Filters snap-in:

You must see these two filters in the list: ISAPI_Rewrite_32 and ISAPI_Rewrite_x64:

Installer also adds ISAPI_Rewrite proxy dlls (both x86 and x64) into the list of ISAPI and CGI restrictions

and marks them as Allowed.

That's all that is done by installer or (in a rare case when it fails) by you:) Now you may test ISAPI_Rewrite operation using this simple rule:
RewriteRule .? – [G]

Save the config and make request to any page on your site. "Gone" result will evidence successful installation:


Now let's turn on 32-bit applications compatibility mode (if you need to).
Click on the Application Pools node in IIS Manager:

And go to Advanced Settings of DefaultAppPool:

Set "Enable 32-Bit Applications" parameter to True:

And test if ISAPI_Rewrite still works with the same rule and URL you used above. The result should be just the same:

We find it quite helpful to know what's happening behind the scenes. And hope you also do.
Take care.

Regards,
HeliconTech Team

Thursday, October 22, 2009

Titbits: ISAPI_Rewrite double registration

Hello!

We have decided to start a series of little titbits about our software. You may find them interesting
and helpful.

Today we're gonna explain you what the “double registration” term means. It's a typical situation on our support when a user can't get ISAPI_Rewrite working while everything seems great, NTFS permissions are OK, the rules are the simplest ever but still no go.

In these cases we commonly ask the user to provide their IIS metabase.
On Windows 2003 Server you may find it here: C:\windows\system32\inetsrv\metabase.xml.
Windows 2008 provides another configuration model and we ask for C:\windows\system32\inetsrv\config\applicationHost.config.

Generally, double registration means simultaneous registration of ISAPI_Rewrite.dll on two different levels. “Web Sites” tree node is what we call “global level”. If you have ISAPI_Rewrite registered here, you will have the tool working for every web-site on your server. Saying “local level” we imply particular web-site.

So the point is you must have only one type of the registration — either on the global level, or on one or several local levels (to enable ISAPI_Rewrite for one or several sites respectively).

Within IIS metabase a double registration issue looks as follows:
<IIsFilter Location ="/LM/W3SVC/1800802984/filters/ISAPI_REWRITE"
  FilterPath="C:\Program Files\Helicon\ISAPI_Rewrite3\ISAPI_Rewrite.dll"
 >
</IIsFilter>

<IIsFilters Location ="/LM/W3SVC/Filters"
  AdminACL="49634462f0000000a400000040000000b171b2f1d344c28255ce51e983b630fed611621d5ecedb78dbe4d4cf30d63e00bb48ac0f5f50c7ecafaf6a3bc3de47b88f801eff2a1c5deda33ad14d7970891db279691971967ed7214857d1b7393ed14cb23e0c248b389f1ad5ebd7b467ef0a0f510a4a967021f12c840c0097ca7e01c449811791c3abf7594c4a61b16498d62dd88d97ac2773ca613785a820f796656421ec2a2780f31897832216525befc0e505582a3377e9928d3ace3b5c59dc00020ee64908c1d1f355776fb12408b349f691ef5761086a5b81869459e2f34e03772da0fb49dc45b8c0d7c1c12c4a252d51e69ce79bb7342d"
  FilterLoadOrder="ASP.NET_2.0.50727.0,ISAPI_Rewrite3"
 >
</IIsFilters>
If you selected automatic installation of ISAPI_Rewrite you would have the tool registered globally. Here is an example:


The next screenshot demonstrates correct local registration, which you can't get from the installation wizard, but should perform manually:


This is it. We've described the very gist of double registration and hope you won't have such misconfiguration on your system.

Yours sincerely,
Helicon Tech team.