Three major technologies for deploying ASP.net (Next) (3)

Source: Internet
Author: User
asp.net in addition to the splash Screen dialog box, the user Interface Editor also provides a number of other predefined dialog boxes, such as license agreements, Readme files, registered users, customer information, and so on, which can be added directly by using the Add dialog window in Figure Five.

Viii. Deploying IIS configuration Information

When you are ready to deploy the ASP.net application, one of the important issues to consider is how to deploy IIS configuration information while deploying the application. If you deploy a Web application using direct replication, such as Xcopy command, Windows Explorer replication, FTP operations, and so on, the deployment operation obviously does not involve IIS configuration information, the configuration of IIS must be set individually, either manually on the target machine, or scripted to be set automatically.

If you deploy the application with the Vs.net Copy Project feature, the virtual directory is automatically created on the target server, but the configuration information for IIS is not replicated to the new virtual directory on the target server, and the new virtual directory simply inherits the default settings from the Web site, that is, We still have to set up the configuration information for IIS separately. Only by using the Web Setup project to deploy the ASP.net application can we let Setup automatically set the configuration information for IIS on the target machine.

To configure settings for a virtual directory, first open the File System Editor, right-click Web Application Folder, select the Menu Properties window, and open the Properties window of Figure six.



Figure Six

In the Figure Six dialog box, we can configure a number of important properties, including:

⑴allowdirectorybrowsing: Allows you to set the IIS directory browsing properties for the specified directory. This setup project corresponds to the Directory browsing check box of the Web Site Properties dialog box Directory Settings page in IIS Manager, and can be set to TRUE or false.

⑵allowreadaccess: This property allows you to set the IIS Read property of the folder, which can be set to TRUE or false.

⑶allowscriptsourceaccess: This property sets the IIS Script resource access property for the folder.

⑷allowwriteaccess: This property sets the IIS write property for the folder.

⑸applicationprotection: This property sets the IIS Application Protection property for the folder, which can be set to Vsdaplow, Vsdapmedium, Vsdaphigh.

⑹appmappings: This property sets the IIS application mapping property of the folder.

To set additional IIS properties

Some IIS configuration properties cannot be set directly in the Properties window of the Web Setup project, including directory-safe configuration (anonymous access, Basic authentication, or Windows authentication), custom errors, and so on.

However, we can solve the problem in other ways, one of the most effective ways is to use the "Custom action" in the Windows installation files. As mentioned earlier, we can use "Custom actions" to run some code at the end of the installation to complete actions that could not be performed during installation, and the code for the custom action could be a DLL, execution file, script, or assembly.

Installing ASP.net Web applications

After you create a Windows installation file (. msi file), it is convenient to install the ASP.net application on the target server, as long as you double-click the. msi file in Windows Explorer to start the Setup wizard, which helps the user complete the installation process. After the ASP.net application is installed, we can see the application in the Add or Remove Programs feature in Control Panel, and you can remove the installed ASP.net application at any time using the Add or remove applications feature.

Nine, VS. NET Installation Project VS. Other deployment Scenarios

As mentioned earlier, we can deploy ASP.net Web applications in one of the following scenarios:

The Copy items feature of the ⑴xcopy or vs.net.

⑵vs. NET Web Setup project.

There are limitations to any technology, with Xcopy and the "Copy Project" feature deployed. NET application is no exception. In general, they are only available for simple, manual-enabled occasions and are ideal for instant updates. But, on some occasions, Xcopy is not very suitable, we need some more powerful deployment scenarios, such as:

⑴. NET applications use some COM components, we want to automate the deployment of these COM components (rather than manually), and must complete the registration of these COM components during installation.

⑵ needs to precompile a single assembly on the remote computer to the cost machine code.

⑶ need to install some assemblies to the global Assembly Cache of the remote machine.

⑷ needs to install an application as a Windows service.

⑸ is going to create a desktop shortcut, add a program to the Add or Remove Programs list, create a shortcut to the Start menu, and so on.

In these cases, we need a more powerful deployment scenario, which is the Web deployment project that Vs.net provides. Many times, end users are actually using some kind of deployment scenario, and end users often lack the skills necessary to manually configure applications, VS. NET Web Setup project provides an Easy-to-use user interface that automates the full range of complex configuration operations that must be performed during installation. Not only that, VS. NET's Web Setup project has the following advantages:

⑴ When we install an application, all information about the application is recorded in a Windows installation database. If we want to remove the application, the system checks the installation database to make sure that other applications do not rely on some components that will be removed, thus avoiding the notorious DLL hell problem.

⑵ If the installation fails, you can perform a thorough fallback, removing all traces of the installation from the system.

Conclusion: In this article, we explored various scenarios for deploying ASP.net Web applications, including Xcopy, VS. NET's "Copy Project" feature, as well as the Vs.net Web Setup project, understand the pros and cons of each deployment scenario and where it fits. I hope this article will help you with the content.

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.