title: Stopping Non-Users from Accessing Static Resources
body: <p>I'm working on restricting access of static PDF files to only logged-in users. I only want to use a server-side redirect from the resource when a request comes that doesn't have the proper credentials.</p>
  
  <p>I could use an <code>IHttpHandler</code> and set the <code>path</code> value, but I don't want to have to hand-serve the file. I would like requests from logged-in users to pass straight through, more like an <code>IHttpModule</code>, except I can't set a path to restrict the files that the module will act on.</p>
  
  <p>Is there a way to pass requests through a handler, or limit the path of a module?</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>It may also be useful to note that I want to redirect the user to a login page with a specific query string parameter redirecting the user back to the resource if login is successful.</p>