Net4.0-web Deployment Tool

Source: Internet
Author: User
Document directory
  • Vs2008 web deployment and vs2010 web deployment
  • Webconfig file in vs2010web Project
  • Build deployment package
Vs2008 web deployment and vs2010 web deployment

Compared with previous versions, the Web Deployment Tool of vs2010 has made great improvements. Let's take a look at the images of the Web deployment tools of vs2010 and vs2008:

Vs2008

 

In vs2008, the publish Web dialog box is displayed. Click the select path button.

 

In this dialog box, you can select any release method.

Improvements have been made in vs2010, encapsulating multiple steps together, also known as "one-click deployment", making the deployment easier. For example:

Vs2010

Right-click a web project in vs2010 and choose publish or click Publish (for example) in the tool bar of Vs to bring up a one-click deployment dialog box.

In the publish Web dialog box, we usually need to fill in the following items

1 Publish profile: the name of the release.

2 publish method: select the publishing method. There are four types: Web deploy, FTP, file system, and FPSE)

3. Server URL: Enter localhost

4 site/application: the name of the site to be released. Here we select the default site (default web site) to be released to the local machine)

The entered dialog box is as follows:

Click the Save button in the upper-right corner to save the current settings for future use. The configuration information is stored in the root directory of the project with a suffix. publish. the content of an XML file is as follows:

 

An error occurs when you click the publish button because the runtime version of the application pool is not 4.0, for example:

Open iis7 and modify the version of the application pool of the default site to 4.0, as shown in:

After the modification is complete, you can see the prompt that the release is successful after the republishing.

Webconfig file in vs2010web Project

The webconfig file of the web project in vs2010 is different from the previous version. Two files, debug and release, are added, for example:

The two files correspond to the selected debug or release during project compilation, which can meet the different requirements of the debug and release modes. In addition, you can add new configuration files to meet different requirements. For example, if you need a configuration file in the testing environment, follow these steps:

1. Open the build-Configuration Manager dialog box, for example:

2. Click new. In the displayed dialog box, enter the file name testing.

3. Click "OK" and the testing will appear in the drop-down box. Now, the webconfig file in the project contains only the debug and release files, but the newly added testing file does not. Right-click the webconfig file and choose add config transforms. The testing configuration file appears, for example:

4. We can modify different configuration files to meet the requirements in different environments.

Build deployment package

In addition to publishing web programs using the traditional method described above, you can also right-click a web project by building a deployment package. Two more items are displayed in the menu than in the previous version:

1 build deployment package: Create a deployment package

2 package/publish settings: set to create a deployment package

Click package/publish settings and open the properties of the project, and then select package/publish web. The effect is the same, for example:

You can experiment with the configuration options on this page. After these configurations, click build deployment package to generate the deployment package. The package is generated as a zip file named project name. The file is stored in the OBJ \ Testing \ package, OBJ \ debug \ package, or OBJ \ release \ package of the project. The release mode is used.

After the deployment package is built, you only need to generate the ZIP file to deploy the package. There are two ways to deploy the package:

1. In the same directory of the ZIP file, there is a project with the same name and suffix. deploy. CMD file. This is a command line file. Execute some script commands in the file for deployment. For details about the deployment settings in this mode, see the README file in the same directory. This method is difficult.

2. The second method requires a third-party software called Web deploy. You can click here to download and install the software. After downloading and installing the software, right-click the site on iis7 and there will be an extra deployment ..." Options, such:

Select import application. In the displayed dialog box, select the generated ZIP file and follow the next step, for example:

The Web application is deployed in iis7.

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.