title: Why isn't #include working on .asp page in IIS7.5?
body: <p>I saw a similar question to this, but mine is slightly different:</p>
  
  <p>I'm get intermittent results with #include files working on an IIS 7.5 server (R2008 V2). My includes are only working if they are in the same folder as the current .asp page, or in a subfolder of the current page. This is inconvenient, as I'd like to keep them all in a /lib subfolder, off of the main page.</p>
  
  <p>My configuration: I have a folder named DCN, sitting right below the wwwroot folder. There are several files in a /lib folder within the DCN folder, so the absolute path is c:\inetpub\wwwroot\dcn\lib\my_include_file.asp. If I open an ASP page in the DCN folder, I can pull include files from the /lib subfolder. However, if I open an ASP page from the DCN/trouble folder (such as "DCN\Trouble\Search.asp"), and the search.asp page has a line that says:</p>
  
  <pre><code>&lt;!--#include file="../lib/my_include_file.asp"--&gt;
  </code></pre>
  
  <p>the include fails, and I get a 500 error.</p>
  
  <p>I've also tried:</p>
  
  <pre><code>&lt;!--#include file="/lib/my_include_file.asp"--&gt; 
  </code></pre>
  
  <p>with the same results. Same with:</p>
  
  <pre><code>&lt;!--#include file="/DCN/lib/my_include_file.asp"--&gt;
  </code></pre>
  
  <p>I changed the slashes to backslashes, with the same results. I even went so far as to try:</p>
  
  <pre><code> &lt;!--#include file="c:\inetpub\wwwroot\dcn\lib\my_include_file.asp"--&gt;
  </code></pre>
  
  <p>(out of sheer desparation), but am still getting the same results.</p>
  
  <p>If I create a subfolder in the dcn\trouble folder, I can include files from it, but obviously, this is not ideal.</p>
  
  <p>Any suggestions would be greatly appreciated. I can't help but think this is something trivial. Thanks in advance!</p>