title: Precompiled ASP.NET web application: error "System.Web.HttpException file filename.aspx has not been pre-compiled, and cannot be requested."
body: <p>I've created a web deployment project using the template for Visual Studio 2008 for a ASP.NET 3.5 web application (not web site).</p>
  
  <p>I compiled the project which created the files needed for deployment. I copied the resulting folders (bin, static files and all folders with the aspx placeholders etc.) to a staging server where I wanted to test the application.</p>
  
  <p>If I <strong>don't</strong> flag the option <strong>"Allow this precompiled site to be updatable"</strong>, I get this error message on every page I load in the browser:</p>
  
  <pre>
  System.Web.HttpException file PAGENAME.aspx has not been pre-compiled, 
  and cannot be requested.
  </pre>
  
  <p>the last line in the stack trace:</p>
  
  <pre>
  System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(
    VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, 
    Boolean allowBuildInPrecompile) +8756366
  </pre>
  
  <p>If I check the option, everything is fine (I guess because the actual aspx/ascx are still there in their original form).</p>
  
  <p>Any idea what I am missing here? Is there some setting or special file I forgot to copy?</p>
  
  <p><em>Thank you!</em></p>
  
  <p>Notes:</p>
  
  <ul>
  <li>I have a few references to third-party assemblies</li>
  <li>I've checked the bin folder on the staging server. It contains the precompiled assembly which contains all classes (I used Reflector to analyze the assembly).</li>
  </ul>