Now that we support it, here’s a quick tutorial on how to deploy an ASP.NET Core 1.0 Application to Winhost using Web Deploy.
- Log into your Winhost Control Panel.
- Go to the Site Info section and click on the Publishing Information link to the right of Web Deploy.
- Click on the Download button to download your publishing profile.
- Download this PowerShell script from GitHub and place it in C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\Web Tools\Publish\Scripts\1.1.0\publish-module.psm1. If you can’t find this directory, then check to see if you’ve installed Visual Studio to another location (e.g. D: or E: drive).
- Launch Visual Studio and create or load your project.
- When you’re ready to publish, go to Build -> Publish solution_name.
- Select the Import option and browse to the publishing profile that you downloaded above. Click OK to load the profile.
- In the Connection section, append this query string at the end of the URL in the Server field: ?site=site_name where site_name is the primary domain name of your website.
- Click the Validate Connection button and make sure you get a green check mark. If you get a green check mark, then you can proceed to click the Publish button to deploy your website. If you get a yellow warning sign, then you can open up a support ticket so that we can help you troubleshoot the problem.
Please note that you cannot publish to a sub-directory using Web Deploy at this time due to a bug which Microsoft will correct at a later date. If you want to publish your application to a sub-directory, you will need to use FTP.
Hi,
Thanks for the information. I tried the steps explained in this blog but I’m getting an error saying “Could not connect to the remote computer”. I can send screenshots as well if that helps.
One thing is that I need to deploy the site in a subfolder which I guess is not possible yet. Is there a way to do the ASP.Net core deployment manually using File System publish option?
Hi Ron,
Make sure your firewall is not blocking the connection (i.e. port 8172 is open). If you’re still having trouble, open a support ticket. And yes, you can use the File System publish option. Just publish your application locally, and then upload that to your Winhost account. You can’t publish to a sub-folder using Web Deploy, but you can publish it using FTP or File System option. It will work.
Thanks for your help and the reference to this documentation.