How To Create C# ASP.NET Core Web Application

How To Create C# ASP.NET Core Web Application

In this post for C# development with ASP.NET Core, You will learn how to create C# ASP.NET Core web application in Visual Studio 2019.

This post will show you how to:

Create a Visual Studio project

Create a C# ASP.NET Core web app

Run the web app

First, Open your Visual Studio 2019 and on the start window click on “Create a new project”.

In the “Create a new project” dialog box comes with different types of .NET Core application  templates to build a fully functional website. First, Select C# from the Language list. 

Next, select Windows from the platform list, and Web from the project types list. In this post, We will create a simple web application. So after you select the language, platform, and project type filters, select ASP.NET Core Web Application template and then select Next.

In the Configure your new project window, give the project name, location, and the solution name for your ASP.NET Core application. In this example, we will give the name “MyFirstCoreApp” in the Project name field and click on the Next button, as shown below.

In this Additional information window, keep that .NET 5.0 appears in the Target Framework field and you can  enable Configure for HTTPS, Docker support and add authentication support. 

If you want HTTPS at this point, then check Configure for HTTPS checkbox, as shown below. Leave the Enable Docker box and Enable Razor runtime compilation unchecked, and select None for Authentication Type. Next, select Create.

This will create a new ASP.NET Core web project in Visual Studio 2019. You have to wait for some time till Visual Studio restores the packages in your project.

Click on IIS Express or you can press Ctrl + F5 to run your web application. This will open the browser and show the result as follows.

Thus, we can create a new cross-platform ASP.NET Core 5.0 web application that runs on .NET Core.

Previous – How to create a custom filter in ASP.NET MVC?

leave your comment

Your email address will not be published.