title: How to apply a custom handlers to only specific folder
body: <p>I use Asp.Net 4 C# and IIS 7.5.</p>
  
  <p>In web.config I was able to apply my handler with success (code below) as you can see  <code>path="*.jpg"</code> let the handler operate in any folder of my website.</p>
  
  <p>I need instead apply this handler <code>to all .jpg request but ONLY in a specific folder</code>, in my case <code>/Cdn/Cms/Images/</code></p>
  
  <p>So I update to <code>path="/Cdn/Cms/Images/*.jpg"</code> but the handler does not apply.</p>
  
  <p>I tried many times with different paths but now way.</p>
  
  <p>How can I apply a handler to only a specific folder?</p>
  
  <p>Thanks for your time on this.</p>
  
  <p>This question is related to <a href="https://stackoverflow.com/questions/7806414/virtual-paths-to-actual-physical-files-using-routing-in-asp-net-and-iis">this one</a></p>
  
  <pre><code>   &lt;system.webServer&gt;
  ...
          &lt;validation validateIntegratedModeConfiguration="false" /&gt;
  
          &lt;handlers&gt;
              &lt;add name="Cms-ImageRouteHandler" path="*.jpg" verb="*" type="WebProject.Cms.BusinessLogics.SEO.Routing.ImageRouteHandler" resourceType="Unspecified" requireAccess="Script" preCondition="integratedMode" /&gt;
          &lt;/handlers&gt;
  ...
  </code></pre>