[Initial code] refresh the release of. NET Web applications using Web Deploy in Window Server 2016, 2016 deploy
In the course of study and work, I found that many colleagues and friends are doing this. when the Web application is released, it is still generated and copied to the server. A little more advanced, that is, it is first published locally and then uploaded to the server.
This method is not only inefficient, but also difficult to implement version control. The program is a little more complicated. In addition, with team collaboration, various unexpected version problems will occur during release.
We are playing Azure and Windows Server 2016 in the past two days. For details, refer to [initial code] [Azure series] 1. Feel Azure again, experience Windows Server 2016, and deploy BlogEngine. NET, and I have encountered many pitfalls about Web Deploy in actual use. So here, I will repeat the complete configuration and usage of WebDeploy.
It is worth noting that although Windows Server 2016 is used as a demonstration, the steps in Windows Server 2012 R2 are exactly the same!
The complete steps are as follows:
1. Click "get new Web platform components" in IIS
2. Download and install Web platform components
3. Search for Web Deploy, find version 3.5, and install
4. Search for Web Deploy 3.6 and install
After installation, go to IIS again and find some new features.
5. Go to computer management and modify the password attributes of two users (WDeployAdmin and WDeployConfigWriter), including setting a password that never expires and setting a fixed password.
6. Return to IIS and reconfigure the users of some of the providers in the management service Delegate of Web Deploy (use the password you just set)
Here we only list the configuration of one backupSettings. The other three can be painted Based on the gourd image.
7. Add an IIS Administrator
7. configure the firewall
We can see that the default service port of the WebDeploy service is 8172.
Therefore, you must add an inbound rule for port 8172 to the ingress rule.
By default, the WebDeploy program will add firewall exceptions, but if it still does not work, you need to manually add it.
Okay. So far, the Web Deploy configuration has been completed,Be sure to restart the server
Next, we also need to perform the test (next, do not go, it is very important to have one step of permission configuration in the test)
1. Create an IIS Site
It is worth noting that the Local Service permission must be granted to the folder in the directory where the IIS site is located! Otherwise, the system will prompt whether the permission is correct when publishing!
2. In the site's IIS manager permission, add the newly added IIS Management User
Note that IIS supports detailed permission configuration for sub-sites. Similar configuration can be performed for sub-applications.
3. Create an asp.net web applicaiton Empty Project in Visual Studio 2015 for testing.
Create a webpage
4. Test and release
The site name here is the site name of IIS. If it is a child site, enter
WebDeploy test/sub-site
Before publishing, you 'd better preview it. This is a good habit of publishing!
The last point is published, and a record will appear.
Okay, take a look at the effect of http://webdeploytest.printhelloworld.com/
Author: Zhang Rou, published in the blog Park and the blog of Zhang ROU
Reprint please indicate the source, welcome to mail exchange: zhangrou@printhelloworld.com, or add QQ group: 11444444