how do I know what version of IIS7 URL Rewrite module is installed

For sure @Kev Answer helped me to identify the version, but it seems there is a alternative to that. I was just checking the control panel > installed programs. There I found version install. If it is installed then you check the version and compare with @Kev answer to know whether it is version 1 or 2

Control panel Url Rewrite Module Image


The binary for Url Rewrite is located at:

%SystemRoot%\system32\inetsrv\rewrite.dll

Url Rewrite 1.1 has a File Version of 7.1.490.43.
Url Rewrite 2.0 has a File Version of 7.1.761.0 or 7.1.871.0 (there may be others but these are the two different versions I know of).

If you don't have console access to verify the version number try running the following code in a simple web page:

Assembly a = Assembly.Load("Microsoft.Web.Iis.Rewrite, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35");
Response.Write(a.FullName);

If UrlRewrite 2.0 is installed then you'll see something like:

Microsoft.Web.Iis.Rewrite, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35

If it isn't then you'll get an exception thrown:

Could not load file or assembly 'Microsoft.Web.Iis.Rewrite, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.

You could also point them at this documentation page:

Tracking Capture Groups Across Conditions

This paragraph makes it pretty clear that trackAllCaptures is a 2.0 specific setting and if it isn't working then 2.0 is definitely not installed:

In URL Rewrite Module 2.0, it is possible to change how capture groups are indexed. Enabling trackAllCaptures setting to on the <conditions> collection makes the capture groups form all matched conditions to be available through the back-references.