NET4.0---Web Deployment tool

Source: Internet
Author: User
VS2008 Web deployments and VS2010 Web deployments

VS2010 's Web Deployment tool has improved significantly compared to previous versions, let's look at the pictures of the VS2010 and VS2008 Web Deployment tools:

VS2008

In VS2008, the first is to pop the Publish Web dialog box, click the Select Path button and pop up the following dialog

In this dialog box, you can choose any type of publishing.

Improvements have been made in VS2010, encapsulating multiple steps together, also known as "one-click Deployment," making deployment easier. The following figure:

VS2010

Right-click on the VS2010 Web project to select Publish or click on the Publish in the VS toolbar (pictured below) to eject a key Deployment dialog box

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

1 Publish Profile: This is the name of the publication

2 Publish Method: Select the way to publish, there are four kinds (Web Deploy, FTP, File System, FPSE)

3 Server URL: If you can fill out localhost directly in local

4 Site/application: The name of the published site, where we choose to publish to the default site of this computer (Defaults Web site)

Enter the completed dialog box as shown below:

Click the Save button in the upper-right corner to save the current settings for later use, with a suffix of the configuration information stored in the root of the project. In the Publish.xml file, the contents of the file are as follows:

An error occurs when you click the Publish button because the runtime version of the application pool is not 4.0, as shown in the following figure:

To open IIS7, modify the default site's application pool version to 4.0, as shown in the following figure:

Once the modification is complete, republish to see the success of the release prompts. webconfig files in the Vs2010web project

The Webconfig file for the Web project in VS2010 is different from the previous version, and the debug and release two files are added, as shown in the following figure:

This two file corresponds to the debug or release that we chose when compiling the project to accommodate the different requirements of the debug and release two modes. And we can also add new profiles ourselves to adapt to different requirements, for example, now need a test environment of the configuration file, you can follow the following steps:

1 Open the Build-configuration Manager dialog box, as shown in the following figure:

2 Click New to enter the file name in the dialog box that pops up testing

The 3 Click OK button testing will appear in the Drop-down box, then look at the project under the Webconfig file is still only debug and release two files, the new testing did not appear. Right-click on Webconfig file, select Add Config transforms,testing configuration file will appear, the following figure:

4 we can build deployment packages by modifying different configuration files to meet requirements in different environments

In addition to publishing web programs in the traditional way described above, you can also right-click on a Web project by building a deployment package, and you'll find two more items in the menu than in the previous version:

1 Build Deployment Package: Creating a Deployment package

2 package/publish settings: Creating a Deployment package

Clicking the Package/publish Settings and opening the properties of the project and selecting the Package/publish Web effect is the same as the following figure:

As for the various configuration options in this interface, it's all clear to experiment yourself. Once configured, click Build Deployment Package to generate the deployment package, which eventually becomes a zip file named Project name. The files are stored under Obj/testing/package, Obj/debug/package, or obj/release/package under the project, which is to be published in that mode.

After you build the deployment package, you need only the generated zip files to deploy, and there are two ways to deploy it:

1 in the same directory as the zip file, there is a file with the name suffix. deploy.cmd, a command line file that executes some script commands in the file for deployment, and the deployment settings in this way are detailed in the Readme file in the same directory. This approach is more difficult.

2 The second way requires a third-party software called the Web deploy, you can click here to download, download installation, in IIS7 's site right click on the "Deployment ..." option, the following figure:

We chose to import the application, pop-up the dialog box to select the previously generated zip file, and then follow the next step, as shown in the following figure:

When finished, the Web program is deployed in the 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.