Datasheet

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 pre-
compiling 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 advan-
tages 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 out-
put of your web application that can be deployed to production servers. Once the output is cre-
ated, 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 host-
ing scenarios.
Speed and Performance
Although ASP.NET 1.x is the one of the world’s fastest web application servers, Microsoft aims to make
it even faster by bundling the performance improvements in ASP.NET 2.0. It is now 64-bit-enabled,
meaning it can take advantage of the full memory address space of new 64-bit processors and servers.
Developers can simply copy existing 32-bit ASP.NET applications onto a 64-bit ASP.NET 2.0 server, and
the web applications will be automatically JIT compiled and executed as native 64-bit applications. As
part of the performance improvements, ASP.NET 2.0 also enhances the caching feature set by providing
new functionalities. The next section provides you with a quick overview of the caching improvements
in ASP.NET 2.0.
Caching Feature
Caching is defined as temporary storage of data for faster retrieval on subsequent requests. In ASP .NET
2.0, the caching support is integrated with the
DataSource controls to cache data in a web page. ASP.NET
2.0 also now includes automatic database server cache invalidation. This powerful and easy-to-use feature
20
Part I: Introduction
05_041796 ch01.qxp 12/29/06 9:09 PM Page 20