Deploy three major ASP. NET technologies (2)

Source: Internet
Author: User

V. Use the "Copy project" function of VS. NET to deploy

VS. NET's "Copy project" feature allows us to easily deploy ASP. NET Web applications to the target server. This function can be used to copy a Web project to the same server or to different servers.

If you use. NET to develop Web applications. The first thing to do before releasing a Web application is to change "Active solution configuration" from Debug to Release, as shown in 3. This option not only enables the compiler to optimize the code, in addition, all debugging-related symbolic information is deleted to make the code run faster. To open the Configuration Manager, select "project"> "XXXX Project Properties" from "solution Resource Manager", where XXXX is the project name, click "Configuration Manager ". Select "Release" in "Active solution configuration ".



Figure 3



To copy a Web project to the target server, select "project"> "Copy project..." In VS. NET, and the VS. NET dialog box is displayed.



Figure 4



The copy project dialog box provides the following options:

(I) Target project folder: used to specify the target location of the duplicate project. The target location can be on the same server or a remote server.

(Ii) Web access method: the method used to copy a Web project to the target folder. There are two Web access methods available. The first is "file sharing", that is, the file sharing mechanism is used to directly access the file system on the Web server. FrontPage Server Extensions are not required on the Web server. The second is "FrontPage ", that is, the Web project files are transmitted to the server through the FrontPage Server Extension Based on the HTTP protocol. This option requires that the FrontPage Server extension must be installed on the Web server, this Web access method can automatically create necessary virtual directories on the target server.

(3) Copy: contains three options: ① only files required to run the application, that is, only files output by the "generate" function are copied (DLL and references in the bin folder) and content files (such. aspx and. asmx file). In most cases, we can use this default option to deploy the application. ② All project files, that is, the files output by the "generate" function (DLL and references in the bin folder) and all files in the project, including the project file and the source program file, ③ all files in the source project folder, that is, all project files and any other files in the project folder (or subfolders.

Select the option in Figure 4 as needed and click "OK" to deploy the Web Project to the server.

Vi. Web-based installation project deployment

XCOPY deployment and VS. NET's "Copy function" are easy to use, but cannot meet all deployment needs. For example, if the application has more complex configuration and deployment requirements, VS. NET's "Web installation project" is the best choice.

Although we can use a lot of scripts to generate outputs, install classes, and create databases to publish Web applications, it is generally easier to use Windows Installer for complex Web application projects. To support Web application deployment, VS. NET provides a "Web installation project ". The Web installation project is different from the ordinary installation project. The Web installation project installs the Web application to the virtual root folder of the Web server, while the general installation project generally installs the application to the Program Files directory.

VS. NET installer is based on Windows Installer, so it can take advantage of Windows installer. Before discussing the VS. NET Web installation project, let's take a look at the main features of the Windows installation program, because it is the core foundation of the VS. NET Web installation project.

6.1 Windows Installer

Windows Installer is a software installation and configuration service. Both Windows 2000 and Windows XP have Windows installer, microsoft also provides a free version with similar functions for all Windows 9x and NT 4 platforms. In Win2K/XP, the core of the Windows Installer is a Windows Installer Service. The Windows Installer Service records every application it installs. When we delete an application, windows Installer checks the installation records and ensures that other applications do not rely on these components before deleting the application components.

Windows Installer divides an application into the following three levels:

(1) Product: a unit that users can install. For example, MS Word is a product that users can install.

(2) function: A product consists of multiple functions, which are the minimum unit for product use. For example, automatic correction is a function of Word.

(3) component: the smallest unit that can be shared among multiple functions and components. Note that components in Windows Installer terms are different from those in. NET frameworks. A Windows Installer component is one or more logically closely related files. It can be an execution file, a DLL file, or a simple text file. A function can be provided by combining multiple components, and a component can also be shared by multiple functions. The function is always for a specific product, and the function name is only unique within a specific product range. In contrast, the component is global, it applies to all products installed on one machine. For example, the spelling check component of Word can be shared among all components that want to implement the spelling check function.

Product-related information, including functions and component descriptions, is stored in an installation database. Installing a database is actually a file with the. msi extension. It not only contains the features and components of the product, but also defines the display order of each user interface during product installation. Because Windows Installer registers a. msi file service program, the operating system automatically calls Windows Installer when you open the. msi file. When Windows Installer is started in this way, the Installer reads the product information from the installation database and determines whether the product has been installed. If the Installer is not installed yet, follow the description of the installation database to start the installation. If the product has been installed, you may perform other operations, such as adding/deleting a function or uninstalling the entire product.


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.