title: HTTP handlers in IIS6 or IIS7 classic mode
body: <p>I'm currently struggling with httphandlers in IIS.
  I'm developing a website in .NET4 in VS2010 and Cassini. In this website, i have a gallery, whose pictures are loaded through my handler.
  For example <a href="http://mywebsite.com/Gallery/123/Pic1.jpg" rel="nofollow">http://mywebsite.com/Gallery/123/Pic1.jpg</a>
  My HTTP Handler gets the id 123 and returns the picture from the database (simplified).</p>
  
  <p>So, everything works fine in Cassini (VS integrated webserver) and in IIS7 in "integrated mode". Pictures are loaded like they should.</p>
  
  <p>But I have to deploy this site on a shared hoster, who is using IIS6.</p>
  
  <p>After many searching and own logging, I found out, the the request isn't routed to my handler, and so I get a 404 from IIS.</p>
  
  <p>My definition which is enough for IIS7 integrated mode:</p>
  
  <pre><code>&lt;system.web&gt;
     &lt;handlers&gt;
         &lt;add verb="*" path="Gallery/*/*" type="[coorect Type spec]" /&gt;
     &lt;/handlers&gt;
  &lt;/system.web&gt;
  </code></pre>
  
  <p>For IIS7 in classic mode I had to add</p>
  
  <pre><code>&lt;system.webServer&gt;
      &lt;handlers&gt;
          &lt;add name="ImageHandler" verb="*" path="Galler&lt;/*/*" type="[type]" modules="IsapiModule" scriptProcessor="c:\windows\Microsoft.net\framework\v4.0.30319\aspnet_isapi.dll"/&gt;
      &lt;/handlers
  &lt;/system.webServer&gt;
  </code></pre>
  
  <p>This last config only works whith the stuff in the module and scriptprocessor attributes...</p>
  
  <p>But this config doesn't work in IIS6....</p>
  
  <p>Can anyone help me ? </p>