Web deploy can be used to upload a site developed through Visual Studio to the web server. Using web deploy can help avoid issues like missing assemblies that might occur when uploading a Visual Studio project via FTP. Note that the steps below are for Visual Studio 2017. Additional information relating to Deployment Mode in Core can be found at the bottom of the article.
Set up a publish profile
In Visual Studio, right click the project and select Publish from the menu.
Select IIS, FTP, etc as the publish target and click Publish.
The web deploy connection settings required are
Server: web###.discountasp.net (replace "web###" with the Server from DiscountASP Control Panel > Account Info / Edit > Web Deploy Publishing Information; see below)
Site name: the website's domain name
User name: Control Panel Login
Password: Same as Control Panel Password
Destination URL: optional and can be left blank; used for a redirection after the site is successfully deployed
After entering the connection information, click Validate Connection. If there is a check mark and the project has no database, click Save. If there is a database, click Next to set up the connection string.
If an error is returned on validation check and the publish connection settings have been verified as being correct, open a ticket with the Support Department
and provide the error in case Web Management Service needs to be manually restarted.
Web Deploy Publishing Information
The connection settings for Web Deploy can be reviewed at DiscountASP Control Panel > Account Info / Edit > Web Deploy Publishing Information
If a connection string is required for the deployed project, a DiscountASP database connection string can be found at DiscountASP Control Panel > MS SQL Manager > Manage (applicable database). Note that the example Connection String does not contain the database password in plain text, so it will need to be updated after copying it to Visual Studio. After adding the connection string, Save.
After saving the publish profile, the left pane in Visual Studio should update. Click Publish to deploy the project to the web server.
Core Publish SettingsDeployment Mode
for Core applications depends on the version being deployed. To check if Framework-Dependent deployment is available for the selected version see https://support.discountasp.net/kb/a1499/installed-_net-core-frameworks.aspx
. Self-Contained deployment should be used for any newer version until installed.Target Runtime
can be left Portable or set to win-x86.
Core Hosting Model defaults to InProcess for deployed apps. If attempting to run more than one app from a single app pool, all Core apps will need to be changed to OutofProcess (case insensitive). The hosting model can be changed by updating the .csproj file (left click on the Project name in Visual Studio) and add the following to the PropertyGroup: