title: HttpHandler not being called
body: <p>I need to write a HttpHandler that will serve up JavaScript files which are embedded resources in .DLLs in my project. A  reference in a view cannot directly see such a resource, so I planned to use a HttpHandler module that would intercept any request with a path /js/[file] , find a matching embedded file and return the script.</p>
  
  <p>The problem is that my HttpHandler code is never called, despite trying lots of different settings in the  section of web.config. I'm obviously missing something but with no error messages I cannot see what that is. All I ever get is a 404 from the static file handler.</p>
  
  <p><strong>Q1) Am I missing something obvious?</strong></p>
  
  <p><strong>Q2) Is there a way to get IIS to tell me why it is not calling my handler?</strong></p>
  
  <p>Summary: I am testing on IIS Express (v8) for an ASP.NET MVC 4 application.</p>
  
  <p>I created a simple library that implements IHttpHandler and added a reference to this in my test MVC application, and the following lines in web.config:</p>
  
  <pre><code>  &lt;system.webServer&gt;
      &lt;validation validateIntegratedModeConfiguration="true" /&gt;
      &lt;handlers&gt;
        &lt;add name="ejs" path="js/*" verb="*" type="EmbeddedJsHandler.EmbeddedJsHandler, EmbeddedJsHandler" preCondition="integratedMode" /&gt;
  </code></pre>
  
  <p>The library is there, but it is never called. Any request with /js/test.js or whatever just results in a 404 error.</p>
  
  <p>So far I've tried lots of different configurations and settings in the handler code. I've tried preCondition, resourceType="Unspecified",  modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" </p>
  
  <p>I've tried paths:</p>
  
  <pre>
    js/*.js
    js/* 
    js/*.*
  </pre>
  
  <p>I've checked the integrated mode settings section (in system.webServer) is being used, and confirmed it is.</p>
  
  <p>I've searched stack overflow for similar cases, and tried many of the possible solutions.. still no joy.</p>
  
  <p>Heck even Jon Skeet has these sort of problems!
  <a href="https://stackoverflow.com/questions/1381258/why-isnt-my-ihttphandler-being-called">Why isn&#39;t my IHttpHandler being called?</a></p>