ASP.NET Precompiled Web Application: Error "System.Web.HttpException file filename.aspx has not been precompiled and cannot be requested."

I created a web deployment project using a template for Visual Studio 2008 for an ASP.NET 3.5 web application (and not a website).

I compiled a project that created the files needed for deployment. I copied the resulting folders (bin, static files and all folders with aspx entries, etc.) to the staging server where I wanted to test the application.

If I do not check the option "Allow updates to this pre-compiled site" , I get this error message on every page loaded in the browser:

System.Web.HttpException file PAGENAME.aspx has not been pre-compiled, 
and cannot be requested.

last line in stack trace:

System.Web.Compilation.BuildManager.GetVPathBuildResultInternal (
  VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, 
  Boolean allowBuildInPrecompile) +8756366

If I check the parameter, everything will be fine (I think, because the actual aspx / ascx is still present in their original form).

Any idea what I'm missing here? Is there any parameter or special file that I forgot to copy?

Thanks!

Notes:

  • I have some links to third-party assemblies
  • I checked the bin folder on the staging server. It contains a precompiled assembly that contains all the classes (I used Reflector to analyze the assembly).
+5
2

ASPX

, , !

bin -. , , .

, .compiled, bin.

+7

".compiled" ( MSDN: ASP.NET):

ASP.NET Web , .compiled . ..compiled . , ASP.NET .

, ASP.NET Bin . .aspx .asmx . - . ASP.NET , .

+1

All Articles