Hide source code
Another by-product of pre-compilation is the ability to hide any or all application source code. This means that other developers need to use The Decompilation program or ilasm to obtain your code. That's all. Pre-compilation allows you to distribute applications in the form of binary files.
There is no source code in the target directory. All classes in the App_Code folder are compiled into one or more binary files and placed in the bin directory. The target directory does not contain source code files (. cs ,. vb ,. js ). In addition, all home page files are compiled to the bin directory as hidden files. All codes and tags of ASPX, ASCX, and ASHX files, and related code hidden files are stored in one or more collections in the bin directory.
Hidden source code is a mixed reputation. Other developers cannot view or change the application in any form-even Web page markup. On the other hand, any changes to the application (regardless of the size) require changes to the original source code, re-compilation, and re-deployment. This may be a very time-consuming process, so it does not necessarily apply to all applications.
The updatable command parameter (u) allows you to replace this default behavior. Using this parameter means that all markup files (ASPX, ASCX, and so on) must be included in the output of the pre-compilation process. Once the application is deployed, these files can still be used for editing and updating. After an application is applied, a small layout problem can be solved through the source file. Therefore, this is an ideal parameter.
Visual Studio support
Pre-compilation is optional when you use Visual Studio 2005 to Develop ASP. NET-based applications. The Publish Web Site menu allows you to push a website to another location as a precompiled application. In addition, the preceding check box allows you to set updatable options.
Summary
The pre-compilation options of ASP. NET 2.0 allow you to pre-compile the application to avoid the latency of the first application call (as in General Compilation. In addition, it provides a certain degree of security, because the source code of the program is invisible in the results, and all content files can be hidden. The preceding section describes ASP. NET pre-compiled applications.
- Analysis of configuration files in ASP. NET
- . Net ria Services is as convenient as ASP. NET
- Overview of the UpdatePanel control in ASP. net ajax Extensions
- ASP. NET calls the UpdatePanel Update () method
- Introduction to the ASP. net ajax wcf Service