32

I created a rewrite rule in IIS7 that uses the trackAllCaptures="false" attribute in the conditions element and uses outboundRules. All works fine on my test system however when I deploy these rules to GoDaddy I get the error:

Unrecognized attribute 'trackAllCaptures' 

And if I include the outboundRules node I get a 500 error from the server. I spoke with their support and they insist that they have support for the 2.0 version of the URL Rewrite module. My question is how do I verify or communicate to them how to check the version of this module? I can't find a way anywhere short of attempting to install it on how to check the version.

I'm attempting to rewrite URL's for an ASP.Net application not WordPress in order to remove the sub-folder from the URL this is a very prevalent issue in their multi-domain hosting. The sample I am using is located here: http://weblogs.asp.net/owscott/archive/2010/05/26/url-rewrite-multiple-domains-under-one-site-part-ii.aspx

Mike Cluck
  • 31,869
  • 13
  • 80
  • 91
blkbam
  • 548
  • 1
  • 5
  • 10
  • I have the 2.0 version installed dated 6/30/2010, it's in %SystemRoot%\system32\inetsrv\rewrite.dll with a file/product version string of 7.1.871.0, so perhaps check the version of your rewrite.dll? – Jim O'Neil Aug 05 '12 at 01:18
  • Do you know if you're running in a Full or Partial Trust environment? – Kev Aug 05 '12 at 02:05
  • I'm running in a medium trust environment. Does trackAllCaptures or the outboundRules require full trust? – blkbam Aug 05 '12 at 14:55
  • No, I had an idea about loading up shell32 to check the File Version/Product Version attributes on the rewrite.dll file. But if you're in a medium trust environment then it probably won't work. – Kev Aug 05 '12 at 15:02
  • I just got off the phone with them and again as they claim they support 2.0 but they are investigating the reason into why it gives an error when using the attribute. That said, I'm going to mark this one as closed since you answered my question. Thanks for your help. – blkbam Aug 05 '12 at 15:30

2 Answers2

37

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.

Kev
  • 118,037
  • 53
  • 300
  • 385
  • When I tried you code sample it works locally and fails when I load it to their server as I'm sure we all expected it to. I'm about to hop on with them and see if I can get a straight answer out of them. – blkbam Aug 05 '12 at 15:00
  • I've had this same problem and have been contacting Godaddy support to inform them. Tonight they created a major ticket to have this problem looked into. I feel like I've accomplished something, but that remains to be seen. trackAllCaptures attribute isn't recognized, even though I think they didn't intend to do that. – rwkiii Oct 27 '12 at 04:23
  • Are you serious? all these only for check the version?? – Simon Borsky Sep 05 '18 at 05:08
  • @simonbor don't shoot the messenger :) – Kev Sep 05 '18 at 09:33
7

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

ArjunArora
  • 986
  • 3
  • 12
  • 27