title: URL Rewrite and IIS Express: some rules work, some don't
body: <p>I'm using IIS Express to develop an MVC 3 application which is doing some URL rewriting in web.config. I have ran into a bit of an oddity where some of the rules work perfectly, while others fail.</p>
  
  <p>For example this one works:</p>
  
  <pre><code>&lt;rule name="Remove ETag"&gt;
   &lt;match serverVariable="RESPONSE_ETag" pattern=".+" /&gt;
   &lt;action type="Rewrite" value="" /&gt;
  &lt;/rule&gt;
  </code></pre>
  
  <p>(source: <a href="https://stackoverflow.com/a/8089525/88709">https://stackoverflow.com/a/8089525/88709</a>)</p>
  
  <p>This one doesn't (gives <code>Unrecognized attribute 'url'</code> in the second line):</p>
  
  <pre><code>&lt;rule name="Remove trailing slash" stopProcessing="true"&gt;
    &lt;match url="(.*)/$" /&gt;
    &lt;conditions&gt;
      &lt;add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /&gt;
      &lt;add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" /&gt;
    &lt;/conditions&gt;
    &lt;action type="Redirect" redirectType="Permanent" url="{R:1}" /&gt;
  &lt;/rule&gt;
  </code></pre>
  
  <p>(source: <a href="http://blogs.iis.net/ruslany/archive/2009/04/08/10-url-rewriting-tips-and-tricks.aspx" rel="nofollow noreferrer">http://blogs.iis.net/ruslany/archive/2009/04/08/10-url-rewriting-tips-and-tricks.aspx</a>)</p>
  
  <p>According to <a href="http://weblogs.asp.net/scottgu/archive/2010/06/28/introducing-iis-express.aspx" rel="nofollow noreferrer">Introducing IIS Express</a>, by ScottGu, IIS Express enables a full web-server feature set – including SSL, <strong>URL Rewrite,</strong> Media Support, and all other IIS 7.x modules.</p>
  
  <p>I was inclined to believe that maybe the URL Rewrite module that ships with IIS Express is the 1.0 version, not 2.0. So I installed <a href="http://www.iis.net/download/urlrewrite" rel="nofollow noreferrer">URL Rewrite Module 2.0</a>, but I still get the same error.</p>
  
  <p>Does anybody have a clue why this happens? In case it matters, my setup is Visual Studio 2010 SP1, IIS Express 7.5.1070, ASP.NET MVC 3.</p>