Deploy three major ASP. NET technologies (6)

Source: Internet
Author: User

In addition to the "Start Screen" dialog box, the user interface editor also provides many other pre-defined dialog boxes, for example, the "License Agreement", "self-report file", "registered user", and "customer information" dialog boxes can be directly added in the "add dialog box" in Figure 5.

8. Deploy IIS configuration information

When preparing to deploy an ASP. NET application, you must consider how to deploy IIS configuration information while deploying the application. If you deploy a Web application using direct replication, such as XCOPY commands, Windows Resource Manager replication, and FTP operations, the deployment operation obviously does not involve IIS configuration information, the IIS configuration must be set separately, manually on the target machine, or automatically set by the script program.

If you use. the "Copy project" function of NET is used to deploy applications. The virtual directory is automatically created on the target server, but the IIS configuration information is still not copied to the virtual directory created on the target server, the new virtual directory only inherits the default settings from the Web site. That is to say, we still need to set the IIS configuration information separately. Only when ASP. NET applications are deployed using a Web installation project can the installation program automatically set IIS configuration information on the target machine.

To configure the virtual directory settings, first open the file system Editor, right-click "Web application folder", and select "Properties window" to open the "properties" window in figure 6.



Figure 6



In the figure 6 dialog box, we can configure many important attributes, including:

(1) AllowDirectoryBrowsing: allows you to set the IIS directory browsing attribute of the specified directory. This setting item is equivalent to the "directory browsing" check box on the directory setting page of the Web website Properties dialog box in IIS manager. It can be set to True or False.

(2) AllowReadAccess: This attribute allows you to set the IIS "read" attribute of the folder, which can be set to True or False.

(3) AllowScriptSourceAccess: This attribute sets the IIS "script Resource Access" attribute of the folder.

(4) AllowWriteAccess: This attribute sets the "write" attribute of IIS in the folder.

⑸ ApplicationProtection: This attribute sets the IIS "application protection" attribute in the folder, which can be set to vsdapLow, vsdapMedium, and vsdapHigh.

⑹ AppMappings: This attribute sets the IIS "application ing" attribute in the folder.

■ Set other IIS attributes

Some IIS configuration properties cannot be set directly in the Properties window of the Web installation project, including Directory Security Configuration (anonymous access, basic verification or Windows verification), custom errors, and so on.

However, we can use other methods to solve the problem. One of the most effective methods is to use "Custom operations" in the Windows Installation File ". As mentioned above, we can use "Custom operations" to run some code at the end of the installation to complete the operations that failed to be performed during the installation, the code for custom operations can be DLL, execution file, script, or assembly.

■ Install ASP. NET Web applications

Create a Windows installation file (. and install ASP. NET application is very convenient, as long as you double-click in Windows Resource Manager. you can start the Installation Wizard for the msi file. The Installation Wizard will help you complete the installation process. Install ASP. NET application, we can see the application in the "add or delete programs" function of the control panel, you can also use the "add or delete application" function to delete installed ASP programs at any time.. NET application.

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

As mentioned above, we can deploy ASP. NET Web applications using one of the following solutions:

(1) XCOPY or VS. NET's "Copy project" function.

(2) Web installation project of VS. NET.

Any technology is limited. Deploying. NET Applications with XCOPY and copy project functions is no exception. Generally, they are only applicable to simple scenarios where manual operations are allowed, and they are ideal for instant updates. However, XCOPY is not applicable in some scenarios. We need a more powerful deployment solution, for example:

(1) the. NET application uses some COM components. to automatically deploy these COM components (rather than manually deploy them), you must register these COM components during installation.

(2) An assembly must be precompiled into local code on a remote computer.

(3) install some Assembly to the Global Assembly Cache of the remote machine.

(4) install an application as a Windows service.

The idea is to create a desktop shortcut, add a program to the "add or delete a program" list, and create a shortcut for the "Start" menu.

In the above cases, we need a more powerful deployment solution, which is a Web deployment project provided by VS. NET. In many cases, the end user actually uses a certain deployment scheme, and the end user often lacks the skills necessary to manually configure the application,. NET Web installation projects provide easy-to-use user interfaces to automate all the complex configuration operations that must be performed during installation. In addition, VS. NET's Web installation project has the following advantages:

(1) When we install an application, all information about the application is recorded in a Windows installation database. If we want to delete this application, the system will check the installation database and confirm that other applications do not depend on some components to be deleted, thus avoiding the notorious DLL Hell problem.

(2) If the installation fails, perform a thorough rollback to clear all installation traces from the system.

Conclusion: In this article, we discuss the deployment of ASP. NET Web applications, including XCOPY and. NET "Copy project" function, and. NET Web installation project, understand the advantages and disadvantages of various deployment solutions and their application scenarios. I hope this article will help you.


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.