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

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.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)