Deploy three major ASP. NET technologies (4)

Source: Internet
Author: User

I. Different types of deployment editors

Ii. File System Editor

3. Registry Editor

Iv. File Type Editor

5. Custom operation Editor

6. Enable the condition editor

VII. User Interface Editor

8. Deploy IIS configuration information

IX. VS. NET installation project VS. Other deployment Solutions

Body:

In the first part of this article, we see how to deploy an ASP.. NET Web applications, including XCOPY deployment and. NET "Copy project" function,. NET Web installation project. In this section, we will learn how to use the features provided by the VS. NET Web installation project to build complex Windows Installation programs. In this process, we will also see how to use the many deployment editors provided by the VS. NET Web installation project template.

I. Different types of deployment editors

When deploying an application, you may need to perform various installation operations, such as setting the structure of the installation directory on the target server, adding the registration key, and checking the startup conditions, and adjust the user interface that appears during the installation process. The Web installation project provided by VS. NET is very powerful and flexible, and we can easily complete the above tasks. VS. NET provides the following deployment Editors:

(1) File System Editor: add the file to the installation package.

(2) Registry Editor: defines the registration key to be created on the target machine.

(3) file type editor: allows you to associate a file extension with an application. When a user opens a file with a specified extension, the application starts automatically.

(4) User Interface Editor: Specify and Set Properties of the predefined dialog box displayed during installation on the target computer.

Custom operation Editor: Specifies additional operations performed on the target computer at the end of the installation, such as running programs that associate server components with specific message queues. Custom operations can be compiled into the .dllor .exe file, or added to a project as a script or assembly. Only in this way can the operation be added to the deployment project. Custom operations can only be run after installation.

⑹ Startup condition editor: specifies the conditions that must be met to successfully run the installation program. For example, check the operating system of a specific version. If you install the software on a system that does not meet the requirements, the installation cannot be performed.

Next, let's take a look at the use of the above various editors through examples.

Ii. File System Editor

From the editor name, you can also guess that the file system editor is used to add project output files, Program sets, and other files to a specific directory of the deployed project. With this editor, we can also specify the directory location on which these files will be installed on the user's computer. The file system editor can be opened as follows: Select "View"> "Editor"> "File System ".

The file system editor predefines many special folders. You can select these folders as the installation directory of the application. With the special folders defined by these file system editors, we can even select the installation location on the target computer without knowing the exact path. The file system Editor provides the following predefined folders:

(1) Application Folder: Generally, the application folder can be represented by the [ProgramFilesFolder] [Manufacturer] [ProductName] path. The values of Manufacturer and ProductName are obtained from the project attribute settings.

(2) Global Assembly Cache Folder: The Global Assembly Buffer folder. Allows you to install an assembly into a shared assembly on the target computer.

(3) User desktop: the location where the desktop project is saved. The default path of this folder is [DriveName] drivers and Settings [UserName] Desktop, where UserName is the name of the user currently executing the installation.

(4) User's "program" menu: place the "program" menu item on the user's computer. The default path is [DriveName] events and Settings [UserName] Start MenuPrograms, where UserName is the name of the user currently executing the installation.

As an example, we assume that an Assembly of the application must be installed in the Global Assembly Cache folder. Select "View"> "Editor"> "File System" from the menu, open the file system editor, and right-click "File System on the target computer ", select "add special folder"> "Global Assembly Cache folder ". After the Global Assembly Cache folder is added, it will appear as a subnode of the "File System on the target computer. Next, you can add the required Assembly to the Global Assembly Cache folder by right-clicking the "Global Assembly Cache folder" subnode and selecting "add"> "Assembly" from the menu ", in the "component selector" dialog box, select the assembly to be added. After the Assembly is added to the "Global Assembly Cache folder" subnode, the installer automatically copies the Assembly to the Global Assembly Cache folder on the target machine.

3. Registry Editor

As the name implies, the Registry Editor is used to manage registry settings on the target machine. By default, the Registry Editor displays standard Windows registration keys, including HKEY_CLASSES_ROOT, HKEY_CURRENT_USER, HKEY_LOCAL_MACHINE, and HKEY_USERS, as shown in figure 1. We can add any registration key under these keys.



Figure 1

Since the content displayed in the Registry Editor represents the Registry structure on the target machine, it actually provides a visual tool for editing the registry key on the target machine, the registration key added here will be automatically added to the registry of the target machine during installation. Suppose we want to add the registration Key under HKEY_LOCAL_MACHINE. the operation procedure is as follows: Right-click HKEY_LOCAL_MACHINE, select "New Key" from the menu, and name the newly added subnode as Software. Right-click the Software node and add the child node MyCompany. Add the subnode ConfigurationSettings under MyCompany in the same way. Right-click the ConfigurationSettings node, select "new"> "string value", change the name of the string value to DBConnectionString, and set the appropriate value. After the settings are completed, the Registry Editor content 2 is shown.



Figure 2



After the application is installed on the target machine, the Registry on the target machine will also contain the ConnectionString shown in figure 2.

Iv. File Type Editor

The file type editor allows you to set file associations that require setup programs to be established on the target machine, that is, to associate a specific file extension with the application to be started when various operations are performed on such files. After the association is established, the extension and description of the file are displayed in Windows Resource Manager. If an application uses a custom file type and must start an independent external application when performing various operations on such files, the file editor provides a very useful mechanism.

In VS. NET, select "View"> "Editor"> "file type" to open the file type editor. The following table shows the important association attributes that should be set when the file extension is associated with a specific application.


Related Article

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.