title: Classic ASP - Custom Error Pages
body: <p>I have a clean install of Windows Server 2008 with IIS7. There I installed "Classic ASP" and the changed the debugging option "Send Errors To Browser" to True.</p>
  
  <p><strong>1.</strong></p>
  
  <p>I created a directory with 2 files:</p>
  
  <pre><code>-- C:\inetpub\wwwroot\stadtbibliothek
   - index.asp -&gt; &lt;% Response.Write "Hello World" %&gt;
   - 500-100.asp -&gt; &lt;% Response.Write "Error" %&gt;
  </code></pre>
  
  <p>I konverted the directory to an application and assigned a application pool i created (.net version: no managed code, pipelinecode: classic).</p>
  
  <p>Then I tested the page from an remote client (<a href="http://svr-name.domain/stadtbibliothek/" rel="noreferrer">http://svr-name.domain/stadtbibliothek/</a>) and "Hello World" showed up.</p>
  
  <p><strong>2.</strong></p>
  
  <p>I added an error to the index.asp file and a web.config file to the "stadtbibliothek" folder (there is none in the root):</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;configuration&gt;
      &lt;system.webServer&gt;
          &lt;defaultDocument&gt;
              &lt;files&gt;
                  &lt;add value="index.asp" /&gt;
              &lt;/files&gt;
          &lt;/defaultDocument&gt;
                  &lt;httpErrors&gt;
                      &lt;remove statusCode="500" subStatusCode="100" /&gt;
                      &lt;error statusCode="500" subStatusCode="100" prefixLanguageFilePath="" path="/error.asp" responseMode="ExecuteURL" /&gt;
                  &lt;/httpErrors&gt;
      &lt;/system.webServer&gt;
  &lt;/configuration&gt;
  </code></pre>
  
  <p><strong>Solution:</strong></p>
  
  <p>Turned out I just needed to include the folder name to the path:</p>
  
  <p><code>&lt;error statusCode="500" subStatusCode="100" prefixLanguageFilePath="" path="/stadtbibliothek/error.asp" responseMode="ExecuteURL" /&gt;</code></p>
  
  <p><strong>Thanks for your suggestions!</strong></p>