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.
For the record, I forgot to copy these ".compiled" files (MSDN documentation: File Handling During ASP.NET Precompilation):
For executable files in an ASP.NET Web application, the compiler assemblies and files with the .compiled file name extension. The assembly name is generated by the compiler. The .compiled file does not contain executable code. Instead, it contains only the information that ASP.NET needs to find the appropriate assembly.
After the precompiled application is deployed, ASP.NET uses the assemblies in the Bin folder to process requests. The precompilation output includes .aspx or .asmx files as placeholders for pages. The placeholder files contain no code. They exist only to provide a way to invoke ASP.NET for a specific page request and so that file permissions can be set to restrict access to the pages.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With