NET site Web Deployment

Source: Internet
Author: User

NET site Web deployment (Implementation of a one-click release)

In the development process often need to publish to the development environment, test environment or pre-release environment to test the effectiveness of other colleagues, and so on, each release to backup, copy, modify the configuration file and so the repetitive operation is very troublesome, inefficient, and web deployment provides such a solution: Install the Web on the server Deploy service, by the Web Deploy service to complete the backup release, and so on, today's small series in an illustrated way to complete the installation of the deployment process, the following two parts:

Part I: Installation and setup of the Web deploy service

One, install the IIS Admin Service: Open Server Manager-add roles and features tick the Web server (IIS) Management Services option (a), and then click Next to complete the installation

Figure A

Second, install Web Deploy V3.6

: https://www.microsoft.com/zh-CN/download/details.aspx?id=43717

Install directly after download, I choose the full installation option

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

Third, start the Web deploy service

After the Web Deploy service is installed, it is generally not started by default, which is what I have encountered, and you must stop the Web Deploy service before changing the configuration, and two:

Figure II

To change the service configuration steps: Open IIS home page-Manage Services-change configuration: Start remote connection option on (c)

Might

Four, open the firewall inbound rules of the corresponding port, if you did not change the port in the previous step, then the default is 8172, four

Figure Four

Figure Five

Vi. Set IIS Manager permissions for the target site, vi

Figure Six

Add the Local service user to the root folder of the target site and set the permissions for full control to seven

Figure Seven

As of this end, the operation on the server is complete, followed by an example of VS2015 on the client.

The second part, the publishing site

First, before the release, we will add a configuration transformation, because the local configuration and configuration on the server is generally different, so add a configuration transformation to resolve the issue of differences, before adding a configuration transformation to add a corresponding solution configuration, add the method eight is shown:

Figure Eight

Second, the solution configuration is usually named according to the target environment of the publication, so that it is clear to which server environment, and then in the Solution Site root right-click the Web. config file, add the configuration transformation in the popup context menu, IX:

Figure Nine

The last to more than a web. Test environment. config file 10:

Figure 10

Third, in the transformation configuration file to add a different configuration node, in general, the database connection, each server environment is not the same, here is the connectionstrings node as an example for a simple explanation, for more information about using the Web. config transformation, visit the HTTP ://go.microsoft.com/fwlink/? linkid=125889, such as Xi.

Figure 11

After the add is complete, you can right-click the Web. Test environment. config file previews the converted results in the popup context menu, 12

Figure 12

Four, publish and Release configuration, right-click Web Project in the context menu choose the Publish menu, pop-up interface Select Custom, we still enter the test environment, 13

Figure 13

Click OK to go to the Choose the Publishing method interface, here choose Web Deploy, 14

Figure 14

Here are a few parameters to explain:

1, Server: The server IP address of the test environment, here is the first part of this article describes the server IP address

2, Site name: Publish the target site, here is the first part of this article introduced in the server created by the Deploytest site

3. User name: The user name allowed by the target site, this is the first part of this article describes the test user added to the deploytest site

4. Password: password of user name

5. Destination URL: The homepage of the website, this option is optional

6, verify the connection: This button is used to verify that you fill in the parameters are correct, if everything is normal, then click on the next page, go to the Configuration Selection page, in this interface to remember to choose the corresponding configuration, then we choose the test environment, 15

Figure 15

To the last page is the preview, of course you can click on the release, you can also click the preview, selectively publish, 16

Figure 16

Click Publish after the system began to connect the server will be the corresponding site to back up, and then overwrite the site, here the entire process has been completed, thank you for your attention and reading!

Category:. NET C #, ASP.

NET site Web Deployment

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.