SIGN UP MEMBER LOGIN:    
ARTICLE

Compilation Life cycle of Asp.Net 2.0 Web Site

Posted by Gourav Kumar Articles | Coding Best Practices February 05, 2008
This article explains you the order of compilation in an asp.net application.
Reader Level:

We all know the term compilation in Asp.Net. But do you know what is the order of compilation in an asp.net project. Do you know which folder in the application structure gets compiled first and which when get compiled last?

Here is the compilation life cycle of an Asp.Net project in the order they get compiled.

App_GlobalResources: First of all the global resources are compiled and the resource assembly is built. All the assembly's in the bin folder are linked to this assembly.

App_WebResources: Next the web resource folder will be compiled. This will create all the proxy types for the web services. The web reference created is then linked to the resource assembly (if it exists.).

Profile properties (defined in the Web.config file): If we have defined the profile properties in the web.config file than an assembly will be generated for the profile objects.

App_Code: Next all the files in the App_Code folder will be compiled. All code assemblies and the profile assembly are linked to the resources and Web references assemblies if any.

Global.asax: Next the Application object is compiled and then it is linked with all other previously generated assembly's.

Once the top-level items are compiled, the compilation of folder, pages and other items start as and when needed. Here is a list of how this process continues?

App_LocalResources: If the folder containing the requested item contains an App_LocalResources folder, the contents of the local resources folder are compiled and linked to the global resources assembly.

Individual Web pages (.aspx files),
User Controls (.ascx files),
HTTP handlers (.ashx files),

HTTP modules (.asmx files):
Next these files are compiled.

Themes, master pages, other source files are compiled when referenced page is compiled.

Login to add your contents and source code to this article
share this article :
post comment
 
6 Months Free & No Setup Fees ASP.NET Hosting!
Become a Sponsor
PREMIUM SPONSORS
  • ceTE software specializes in components for dynamic PDF generation and manipulation. The DynamicPDF™ product line allows you to dynamically generate PDF documents, merge PDF documents and new content to existing PDF documents from within your applications. Visit DynamicPDF here
    Finally – a virtual platform that delivers next-generation Windows Server 2008 Hyper-V virtualization technology from a managed hosting partner you can truly depend on. Visit www.maximumasp.com/max for a FREE 30 day trial. Hurry offer ends soon. Climb aboard the MaxV platform and take advantage of High Availability, Intelligent Monitoring, Recurrent Backups, and Scalability – with no hassle or hidden fees. As a managed hosting partner focused solely on Microsoft technologies since 2000, MaximumASP is uniquely qualified to provide the superior support that our business is built on. Unparalleled expertise with Microsoft technologies lead to working directly with Microsoft as first to offer IIS 7 and SQL 2008 betas in a hosted environment; partnering in the Go Live Program for Hyper-V; and product co-launches built on WS 2008 with Hyper-V technology.
Team Foundation Server Hosting
Become a Sponsor