title: Processing static files via HttpModule in ASP.NET
body: <p>I have statiс files in website folder, but need to check permissions for every file.
  I decided to use HttpModule for that purposes. </p>
  
  <p>ASP.NET receives all the http-requests (I used wildcard mapping) and </p>
  
  <p>The algorith is the following:</p>
  
  <ol>
  <li>HttpModule receives the request</li>
  <li>HttpModule checks permissions</li>
  <li>If access is denied then the answer is "Forbidden". If all is OK then httpModule's method just returns.</li>
  <li>DefaultHttpHandler is automatically used to process request for static files</li>
  </ol>
  
  <p>The problem is that DefaultHttpHandler is not effective enough (it doesn't use file cache, etc.). But IIS (without ASP.NET) works with static files in a very good way.</p>
  
  <p>All I want is to let IIS serve static files after my checks.
  Is there any way to implement it?</p>