When should I pre-compile my ASP.NET application?

From Guidance Share

Jump to: navigation, search

J.D. Meier, Prashant Bansode, Alex Mackman


You should consider pre-compiling your application,

  • If you want to deploy your ASP.NET application without copying any of the original source code to the production server. This includes the code and markup in aspx, ascx, and master files. This especially true with shared hosted environment where your source code might be vulnerable.
  • If you want to identify compile-time bugs before users see a site, for better user experience.
  • If you want to strong name your ASP.NET application, so that it can work seamlessly with strong name assemblies.
  • Additionally pre-compilation gives a faster response time for users, since pages do not have to be compiled the first time they are requested. This is particularly useful on large sites that are updated frequently.
Personal tools