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).
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.
If I don't flag the option "Allow this precompiled site to be updatable", I get this error message on every page I load in the browser:
System.Web.HttpException file PAGENAME.aspx has not been pre-compiled, and cannot be requested.
the last line in the stack trace:
System.Web.Compilation.BuildManager.GetVPathBuildResultInternal( VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) +8756366
If I check the option, everything is fine (I guess because the actual aspx/ascx are still there in their original form).
Any idea what I am missing here? Is there some setting or special file I forgot to copy?
Thank you!
Notes:
All the ASPX files should only contain
This is a marker file generated by the precompilation tool, and should not be deleted!
Delete everything in your bin folder and publish the web again. Make sure you take the files from the directory where you did the publishing.
Make sure you copy the .compiled
files contained in the bin folder too.