What is the purpose of precompiledApp.config?

Michiel van Oosterhout picture Michiel van Oosterhout · Sep 21, 2009 · Viewed 28.1k times · Source

If you precompile a web site and keep it updatable, the ASP.NET parser can see from the Page directive that there is no codefile or codebehind and where to find the base class (inherits attribute).

<%@ page language="C#" autoeventwireup="true" inherits="_Default, Precompiled"
  theme="Default" validaterequest="false" %>

If the site is precompiled and not updatable, the .compiled files in the bin folder should give the ASP.NET runtime all the necesary information on how to instantiate the page classes.

So why is the precompiledApp.config needed?

Thanks!

Answer

Keith Adler picture Keith Adler · Sep 21, 2009

It's used to indicate whether or not the ASPX/ASCX pages in your site are updateable or not. You can precompile and have the code behind compiled, but leave these pages updateable so you can make minor GUI-related tweaks should you wish.