How to use the Web deploy feature via Visual Studio Print

  • 0

By Default Web Deploy is enabled for all ASP.NET Hosting Accounts. These instructions should work for most versions of Visual Studio with minor graphical display differences.

  1. Open your web application with Visual Studio, right click the web application, then click "Publish" to start.
  2. Download the Web Deploy Publishing Settings XML from your Plesk control panel, then Import it, you can also use Custom settings.





    3. Fill your Web Deploy publish login information and click Validate Connection. The server is awh-plesk1-win2022.adaptivewebhosting.com (port 8172). It uses a publicly trusted certificate, so no certificate warning should appear. If one does, check that the server name is exactly awh-plesk1-win2022.adaptivewebhosting.com and not your own domain or an IP address (see Certificate errors below).







    4. If there is no database which you need to publish, just click "publish" to publish the website files to web server. If there is a database which needs to be published as well. please go step 6 below.

    5. Click "Settings" and then click more button beside the "default connection".



    6. You must first create a database in the Plesk Control Panel. Fill the new database login info you created from control panel and click "OK".

    Please confirm your database login info from your hosting control panel-->Database Manager-->MSSQL Manager

    Server name: Fill the database 'Server URL' (The SQL Server Fully Qualified Domain issued to you in your Hosting Account Welcome Email.)

    User name: Fill the database 'Login Name'

    Password: Fill the database password

    Select or enter a database name: Fill the database 'Database Name'




    7. Then go publish it.


Certificate errors (ERROR_CERTIFICATE_VALIDATION_FAILED)

Web Deploy on our Windows server listens on awh-plesk1-win2022.adaptivewebhosting.com:8172 and uses a publicly trusted Let's Encrypt certificate that renews automatically. If publishing fails with "could not verify the server's certificate" or ERROR_CERTIFICATE_VALIDATION_FAILED:

  • Use the server name, not your domain or an IP address. The certificate is issued for awh-plesk1-win2022.adaptivewebhosting.com. Your own domain on port 8172 does not match it, and a domain behind Cloudflare does not pass port 8172 at all.
  • Visual Studio: in the publish profile set Server to https://awh-plesk1-win2022.adaptivewebhosting.com:8172/msdeploy.axd and Site name to your domain (for example example.com).
  • msdeploy, dotnet publish or CI pipelines: use computerName="https://awh-plesk1-win2022.adaptivewebhosting.com:8172/msdeploy.axd?site=example.com".
  • Only if you must connect by IP address or another name: add -allowUntrusted to the msdeploy command, or <AllowUntrustedCertificate>true</AllowUntrustedCertificate> inside <PropertyGroup> of your .pubxml publish profile. This skips the certificate check, so use the server name above whenever you can.

 


Was this answer helpful?

« Back