ArticleDirectory
- 1. Prepare IIS
- 2. Website
- 3. Deploy the website
FTP deployment deploy the project to the server through FTP (file transfer protocol. FTP deployment is supported by many platforms. Its disadvantage is that it may encounter more firewall problems than Web deployment.
1. Prepare IIS
Start webpi with the Web Platform installer, select "FTP publish service", and click "Install ". Restart IIS if necessary after installation.
First, we need to enable ftp deployment for the IIS website. Right-click the default web site and select "add FTP release". For details, see:
If the server has multiple IP addresses, you can select the address used to listen to deployment requests. If the server only has one interface or you want to listen to requests from all interfaces, leave the IP address value unallocated.
The default value of port 21 is FTP's standard TCP port.
You can select SSL encryption to ensure the security of network traffic during transmission. However, my machine does not have an SSL Certificate installed, so select "No SSL ". Next step.
We hope that only the Administrator account can access this function. Therefore, select "Basic" authentication, select "specify user", and enter "Administrator.
You must be able to read and write content during deployment. Therefore, select the two items at the same time in the permission. Click Finish.
2. Website
We create a project-based website with the same content as the two deployment methods we have previously introduced. However, the text on the page is modified:
3. Deploy the website
Before the first deploymentProgramCreate the target directory because you cannot specify the directory as an application in FTP deployment. Create the ftpdeploy subdirectory and right-click it and select "convert to application ".
In vs, select publish ftp_deploy to see the same dialog box as Web deployment. Select FTP in release mode, and the dialog box layout will change:
Enter the target location here, which is different from Web deployment. The format is as follows:
/Targetlocation "> ftp: // <servername>/targetlocation
Here we do not fill in the default web site, because IIS knows which website we have enabled FTP deployment, so the target location (targetlocation) part of the URL is relative to the root of that website.
Be careful when selecting the target location. You may need to "Replace the matching file with a local copy ".
"Deleting all existing content before release" deletes all content on the server but not on the local project.
Selecting "passive mode" increases the chances of a successful deployment working through the firewall without reconfiguration.
The most likely cause of FTP deployment is firewall settings. If a problem occurs, check the settings of the Windows Firewall on the server and client, and all the physical firewalls in the architecture..
Click Publish. Finally, browse the Web page. Everything is OK.