ASP.NET - Administration and Management - Precompilation

          

ASP.NET 2.0


ASP.NET 2.0 Features
Developer Productivity
            Master Pages
            New Code-Behind Model in ASP.NET 2.0
            Creating & Sharing Reusable Components 
            New ASP.NET 2.0 Controls
                       Data Controls
                       Security Controls
                       Other New Controls
                       Validation Groups
            Themes
            Web Parts Framework
            Visual Studio 2005 Improvements
Administration and Management
Speed and Performance
            Caching Feature
ASP.NET 2.0 Administration and Management 

Professional ASP.NET 2.0 Databases

This excerpt from Professional ASP.NET 2.0 Databases   by Thiru Thangarathinam, is printed with permission from
Wrox Publication.
<<Previous  Next>>

Administration and Management

One of the key goals of ASP.NET 2.0 is to ease the effort required to deploy, manage, and operate ASP.NET web sites. To this end, ASP.NET 2.0 features a new Configuration Management API that enables users to programmatically build programs or scripts that create, read, and update configuration files such as Web.config and machine.config. In addition, there is a new comprehensive admin tool that plugs into the existing IIS Administration MMC, enabling an administrator to graphically read or change any setting within the configuration files. ASP.NET 2.0 also provides new health-monitoring support to enable administrators to be automatically notified when an application on a server starts to experience problems. New tracing features will enable administrators to capture runtime and request data from a production server to better diagnose issues.

Visual Studio 2005 also ships with a new web-based tool that provides a very easy way to administer an ASP.NET web site. You can access this by clicking Website?ASP.NET Configuration in Visual Studio 2005. This web-based tool wraps much of the Management API, thereby providing an easy and effective way to remotely administer a site. Figure 1-4 shows the ASP.NET Web Application Administration tool in action.

ASP.NET Web Application Administration tool in action.

As you can see from Figure 1-4, it provides a simple web interface that allows configuration of all aspects of a site. The interface is designed to be customized, so corporations and hosts can give it a company look.

Precompilation

One of the significant improvements in ASP.NET 2.0 is the capability to request a web form (.aspx file) from a browser without having to compile the code even once. When the page is first requested, ASP.NET compiles the page on the fly, dynamically generating the assembly. This makes it possible for you to resort to the “Just Hit Save” programming model (similar to ASP), wherein you just develop and test the page without having to compile it. After the initial compilation, the compiled page is cached, which is used to satisfy the subsequent requests for the same page. Although this approach is flexible, it does result in a performance hit, especially when the page is requested for the first time, since ASP.NET requires a bit of extra time to compile the code. You can avoid this overhead by leveraging a new feature known as precompilation, using which you can compile an ASP.NET web site before making the web site available to users. Precompilation also allows you to catch all the compilation errors before deploying the application onto the production servers. ASP.NET 2.0 provides the following two options for precompiling a site:

  • In-place precompilation: When you perform in-place precompilation, all ASP.NET files are compiled and stored in a special folder. The precompilation process follows the same logic that ASP.NET uses for dynamic compilation, also taking into consideration the dependencies between files. During precompilation, the compiler creates assemblies for all executable output and places them in a special folder. After the compiled output is created, ASP.NET fulfills requests for pages using the assemblies contained in this folder. One of the important advantages of precompilation is the ability to check the web site for compilation errors. For example, to precompile a web site named Chapter1, enter the following command at the .NET Framework 2.0 SDK command prompt:
    aspnet_compiler –v /myprojects/wrox/chapter1
    The above command will precompile the web site and display the compilation errors in the browser, if there are any.
  • Precompiling a site for deployment: Using this option, you can create a special deployable output of your web application that can be deployed to production servers. Once the output is created, you can deploy the output, using various mechanisms such as XCOPY, FTP, or Windows installers, onto the production servers. To precompile a web site for deployment, use the same aspnet_compiler utility and specify the target path as an additional argument:
    aspnet_compiler –v /myprojects/wrox/chapter1 C:\Chapter1\Output
    This type of precompilation enables applications to be deployed without any source being stored on the server (even the content of .aspx files is removed as part of the precompilation), further protecting your intellectual property. This capability can be very useful in web site hosting scenarios.
<<Previous  Next>>



Write your comment - Share Knowledge and Experience


More Related links 

ASP.NET Overview

This article includes brief about ASP.NET, advantages of ASP.NET, navigation sequence of ASP.NET web form, web Form components, .NET framework, event handlers in ASP.NET, web form events, server control events in ASP.NET, and server controls vs. HTML controls, validation controls, navigation, and steps to store cookies, ways to authenticate and authorize users in ASP.NET etc.

ASP.NET application life cycle

This article describes ASP.NET application life cycle

ASP.NET Application and Session state variables

This articles describes the ways to preserve page data between the requests in ASP.NET using Application and Session state variables.

ADO.NET

This is complete article on ADO.NET with code and interview questions

Difference between Server.Transfer and response.Redirect.

Following are the major differences between Server.Transfer and response.Redirect.....

Difference between authentication and authorization.

Authentication is the process of verifying the identity of a user.......

What is impersonation in ASP.NET?

ASP.NET can also impersonate a specific account you specify in web.config.........

 

Latest placement tests
Latest links
 
Latest MCQs
» General awareness - Banking » ASP.NET » PL/SQL » Mechanical Engineering
» IAS Prelims GS » Java » Programming Language » Electrical Engineering
» English » C++ » Software Engineering » Electronic Engineering
» Quantitative Aptitude » Oracle » English » Finance
Home | About us | Sitemap | Contact us | We are hiring