What is the difference between allowing a precompiled Visual Studio Web Page to be updatable and not? What is the difference between allowing a precompiled Visual Studio Web Page to be updatable and not? asp.net asp.net

What is the difference between allowing a precompiled Visual Studio Web Page to be updatable and not?


Unchecking the "Allow this precompiled site to be updatable" compiles the .Aspx Pages, not just the code files (.VB/.CS). Leaving it checked allows you to make certain changes to the .Aspx files after it has been deployed without recompiling (ex = move the position of a control or add some additional HTML markup).

After reading your description of the deployment issues it seems more likely that the errors are because IIS needs the App Pool refreshed. On a low end VPS, sometimes it just makes sense to bounce (restart) it if you have that luxury.

Read the following MSDN articles for more information on Site Precompilation.

http://msdn.microsoft.com/en-us/library/399f057w(v=vs.80).aspx

http://msdn.microsoft.com/en-us/library/ms247286(v=vs.80).aspx


I have an answer for my own questions, based on what NoAlias said. I read the two links and found the following:

Precompiling for Deployment Only
When you precompile for deploymentonly, the compiler produces assemblies from virtually all ASP.NETsource files that are normally compiled at run time. This includesprogram code in pages, .cs and .vb class files, other code files, andresource files. The compiler removes all source and markup from theoutput. In the resulting layout, compiled files are generated for eachof the .aspx files (with the extension .compiled) that containpointers to the appropriate assembly for that page. To change theWeb site, including the layout of pages, you must change the originalfiles, recompile the site, and redeploy the layout. The only exceptionis the site configuration; you may make changes to the Web.config fileon the production server without having to recompile the site. Thisoption provides the greatest degree of protection for your pages andthe best performance at startup.

Precompiling for Deployment and Update
When you precompile for deployment and update, the compilerproduces assemblies from all source code (except page code insingle-file pages) and from other files that normally produceassemblies, such as resource files. The compiler converts .aspx filesinto single files that use the compiled code-behind model and copiesthem to the layout. This option enables you to make limited changesto the ASP.NET Web pages in your site after compiling them. Forexample, you can change the arrangement of controls, colors, fonts,and other appearance aspects of pages. You can also add controls, aslong as they do not require event handlers or other code. When thesite runs the first time, ASP.NET performs further compilation inorder to create output from the markup. Note

A precompiled updatable site does not allow multiple pages toreference the same CodeFile class.

I had recently made changes to the site to include 2 aspx pages that referenced the same CodeFile (the same VB code in the background) Each page had slightly different html properties, but needed to have identical CodeFiles, so for my second ASP page I deleted the auto-generated VB code file and then referenced a different CodeFile in the HTML.

As Stated above, precompiled updateable sites do not allow multiple pages to reference the same code-file class. Which is why some of my pages weren't working.

From this point on, I need to avoid using the default checkbox "Allow this precompiled site to be updatable"; It must remain unchecked for my website to utilize the VB CodeFiles referenced my multiple pages.

Conclusion: Multiple aspx pages referencing the same CodeFile need to be precompiled to run correctly. This means the site will not be able to have any changes made to it without re-deplyoying.