title: BUG: IIS7 managed requests
body: <p>(<em>I don't know whether should I also post this question to ServerFault, since it's about IIS configuration?</em>)</p>
  
  <p>In IIS7 we can tell a module to run for managed content (thus speeding up static content serving) by:</p>
  
  <pre><code>&lt;modules&gt;
      ...
      &lt;add name="WhateverName"
           type="WhateverType"
           preCondition="managedHandler"
      ...
  &lt;/modules&gt;
  </code></pre>
  
  <p>But. This works fine and dandy as long as there's also a file name (with extension) in the requested URL. If it's omitted it IIS7 will think you want static content and managed modules won't run.</p>
  
  <pre><code>http://localhost/ &lt;-- this one will skip managed handlers
  http://localhost/default.aspx &lt;-- this one will run them
  </code></pre>
  
  <p>If I manually set IIS7 default document, so the first one is <code>default.aspx</code>, <strike>I can see no difference</strike> there's no difference. To me this <em>looks, walks and sounds</em> like a bug. <strong>And it is a bug!</strong> Why? Because when I request for the first one, it is a managed request, isn't it. Of course it is. But IIS7 treats it as a static request. So? <strong>It's a bug</strong>. This request should be treated as managed.</p>
  
  <p><strong>How can I convince IIS7 to run managed handlers for URL requests without file names inside?</strong></p>
  
  <h2>Help with thinking</h2>
  
  <p>Let me help you a bit with thinking: If I'd reorder <code>system.webServer/handlers</code>, I'm sure could solve this. Before the last <code>StaticFile</code> handler that points to <code>StaticFileModule</code>, <code>DefaultDocumentModule</code> and <code>DirectoryBrowsingModule</code> I should be running integrated asp.net handler on Directory requests. Or write my own handler, that would append default document to any directory request. I'm pretty sure one of these should solve it. But how would I have to configure/develop it?</p>