Follow the below instructions to get started with publishing your Visual Studio 2015 Web Application to the server via the Web Deploy method.
1. Launch Visual Studio 2015 and open your web application. Looking to deploy using Visual Studio 2019? Please click on web deploy with Visual Studio 2019 for more details.
2. Now, we will change the configuration setting of a web application to release mode. Visual Studio offers separate release and debug configuration options for applications. The debug configuration is compiled with complete symbolic debug information without optimization, whereas the release configuration does not have symbolic debug information and is fully optimized.
A Debug configuration supports the debugging of applications, and a Release configuration builds a version of the web application ready to be deployed on the server. To set your application in Release mode, follow the below step.
3. Click on the Build menu and then Configuration Manager.
4. In the Configuration Manager dialog box, select the Release option from the Active Solution Configuration drop-down, then Close the dialog box.
5. To deploy your web application, select your web application from Solution Explorer.
6. Right-click on the web application name and then click on Publish option. You will also see Publish option under the Build navigation menu.
7. On the next screen, select Publish Target as Custom.
8. Give your desired name to the new custom profile.
9. On the Publish Web dialog box, specify the following details.
10. Select Publish method to Web Deploy from the drop-down.
11. As per the following web hosting type, you need to specify the web deploy service URL under the Server field.
For Windows Server 2008 Customers:
For Windows Server 2012 Customers:
For Windows Server 2016 Customers:
For Windows VPS Customers:
Configure your VPS for Web Deploy
- Under the Site name option, specify the name of your website.
- Under the Username option, specify the username with the necessary permissions (IIS Manager Permissions) on the web server for web deployment.
- Specify the Password of that username. If you want to save your credentials for future use, check the Save password checkbox.
- Under the Destination URL, specify your website's Fully Qualified Domain Name (FQDN).
12. Once necessary details are specified, click on Validate Connection button to verify the connection. Check Allow Untrusted Certificate checkbox when it prompts. You will see a green tick mark if the connection is established successfully.
13. Click the Publish button to start deploying your web application to the server.
→ Looking to deploy the project using WebMatrix web deploy? Please refer to the web deploy method for more details.