Skip to main content

How to deploy .NET Core Web Application with MSSQL using Visual Studio

This article contains steps on how to publish an ASP.NET Core Web Application with an MSSQL database using Visual Studio.

ASP.NET / .NET Free Hosting
If you don't already have our ASP.NET / .NET free hosting, sign up for FREE at https://MonsterASP.net/.

1) Initial Setup

Create a website from our hosting Control Panel.

Control panel - create website

2) Creating a Project in Visual Studio

Select the ASP.NET Core Web App (Model-View-Controller) project and click Next.
visual_studio_mssql_step_1.png

In Additional Information, set the Authentication type to Individual Accounts and click Create.

visual_studio_mssql_step_2.png

3) Download WebDeploy Publish Profile

First, you need to activate the WebDeploy account in our hosting Control Panel and then download the WebDeploy publishing profile (.publishSettings).

Control panel - activate webdeploy

4) Prepare to Publish the Project

Right-click on the project in Solution Explorer and select "Publish."

Visual Studio - publish - step3

Click Import Profile and select the WebDeploy profile file (.publishSettings) that you downloaded from the hosting Control Panel.

Visual Studio - publish - step4

5) Create an MSSQL Database

Create an MSSQL database from our hosting Control Panel.

db.png

6) Configure the Database in Publish Settings

Before publishing, click Show all settings.

visual_studio_mssql_step_3.png

7) Fill in the Connection String to the Database

In the Database and Entity Framework Migrations sections, you must fill in the Connection String from our hosting Control Panel.

visual_studio_mssql_step_4.png

8) Publish to Server

In the final step, click the "Publish" button. After this action, your ASP.NET Core Web App project will be published to your website.

visual_studio_mssql_step_5.png

9) Congratulations, It's Done

Open the result in your web browser.