ASP. NET site Web deployment (one-click release implementation), asp. netweb

Source: Internet
Author: User

ASP. NET site Web deployment (one-click release implementation), asp. netweb

 

During the development process, you often need to release the product to the development environment, test environment, or pre-release environment for other colleagues to test and verify the effect. Each release must be backed up and copied, modifying configuration files and other repeated operations is very troublesome and the efficiency is greatly reduced. web deployment provides a solution to install the Web Deploy service on the server, the Web Deploy service completes the backup release and other operations. Today, we will introduce the installation and deployment process in a illustrated manner, including the following two parts:

 

Part 1: Installation and setting of the Web Deploy Service

 

1. Install IIS Management Service: Open Server Manager-add roles and functions, select web Server (IIS) Management Service option (1), and click Next to complete installation.

Figure 1

 

Ii. Install Web Deploy V3.6

: Https://www.microsoft.com/zh-CN/download/details.aspx? Id = 43717

Install the SDK directly after the download. I chose the full installation option.

V3.5: https://www.microsoft.com/zh-CN/download/details.aspx? Id = 39277

 

3. Start the Web Deploy Service

After the Web Deploy service is installed, it is not started by default. In this case, you must stop the Web Deploy service before changing the configuration:

 

 

Figure 2

 

To change the service configuration, go to the IIS homepage, choose manage services, and click "modify configuration". (3) enable remote connection)

 

Figure 3

4. Activate the corresponding port of the firewall inbound rule. If you did not change the port in the previous step, the default port is 8172

Figure 4

Figure 5

 

6. Set IIS manager permissions for the target site, and 6

Figure 6

 

7. Add a local service user to the root directory folder of the target site and set the user to full control. 7

Figure 7

 

So far, the operations on the server have been completed. Next, we will take VS2015 as an example to introduce the operations on the client.

 

Part 2: release site

 

1. Before release, we first add a configuration conversion. Because the local configuration and the configuration on the server are generally different, add a configuration conversion to solve the difference, before adding a configuration conversion, add a corresponding solution configuration, as shown in Method 8:

 

Figure 8

2. The solution configuration is generally named according to the target environment of the release. This makes it clear which server environment is the target, and then right-click the web under the root directory of the solution site. config File, add configuration conversion in the pop-up context menu, 9:

 

Figure 9

 

Finally, there is an additional file 10 for the web. test environment. config:

 

Figure 10

 

3. Add different configuration nodes to the conversion configuration file. Generally, the database connection and each server environment are different. Here, the connectionStrings node is used as an example to briefly describe it, for more information about how to use web. for more information about config conversion, visit the http://go.microsoft.com/fwlink? LinkId = 125889, for example, 11

Figure 11

 

After adding the file, right-click the web. test environment. config file and preview the converted result in the context menu.

Figure 12

 

4. Release and release configuration. Right-click the web Project and select the release menu from the context menu. In the displayed page, select Custom. Here, enter the test environment, and click 13th.

Figure 13

Click OK to go to the release method selection page. Here, select Web Deploy, fourteen

Figure 14

There are several parameters to describe:

1. SERVER: the IP address of the server in the test environment. Here is the IP address of the server introduced in the first part of this article.

2. site name: the target site to be released. Here is the DeployTest site created on the server in the first part of this article.

3. User name: the user name allowed by the target site. This is the first part of this article to introduce the Test user added to the DeployTest site.

4. Password: password of the user name

5. Target URL: the home page of the website. This option is optional.

6. Verify connection: This button is used to verify whether the parameters you entered are correct. If everything is normal, click the next page to go to the configuration selection page, in this operation interface, remember to select the corresponding configuration, then we select the test environment, 15

Figure 15

 

The last page is the preview. Of course, you can click Publish or preview to publish the page.

Figure 16

 

After you click Publish, the system starts to connect to the server to back up the corresponding site, and then overwrite the site. The entire process has been completed. Thank you for your attention and reading!

 

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.