In any type of ASP.NET Core projects we can find the Program.cs file, which defines the Program class of the same name and which essentially starts the application execution.

ASP FAQs

For ASP.NET Core development, we can use various tools. If our working platform is Windows, then we can use the full-featured Visual Studio development environment. If we develop on Mac OS or Linux, then we can use the advanced Visual Studio Code editor. This editor can also work under Windows. This tutorial will primarily use Visual Studio 2019.

So, let’s download the VS 2019 installer and run it. First, we are asked to set a number of options. And since we will be working with ASP.NET Core, then select the ASP.NET and web application development item in the installation program:

Also, when you select this item in the box on the right, you can also select optional components that will be installed with ASP.NET. All components can be selected.

In addition, just below, also in the installer program, we need to select another item Cross-platform development .NET Core:

After checking all the options we need, we will install Visual Studio.

After installation, open Microsoft Visual Studio 2019 and when creating a project, select the ASP.NET Core Web Application item – a project type for creating an ASP.NET Core web application:

In the next step, we will give the project some name, for example, HelloApp, and define a location for it on the hard drive:

After that, a window for selecting a template for a new application will appear:

Several types of projects are available to us here:

  • ASP.NET Core Empty: An empty template with the most minimal functionality for building apps from scratch
  • ASP.NET Core Web API: A web application project that uses the REST architecture to create a web service
  • ASP.NET Core Web App: A project that uses Razor Pages by default to handle requests
  • ASP.NET Core Web App (Model-View-Controller): a project that uses the MVC architecture
  • ASP.NET Core with Angular: A project specifically designed to work with Angular 2+.
  • ASP.NET Core with React.js: a project that uses React.JS
  • ASP.NET Core with React.js and Redux: a project that uses React.JS and Redux

In addition, here we can specify the ASP.NET Core version in the drop-down list, but in this case we will leave the default value – ASP.NET Core 5.0.

Also here you can specify the type of authentication that is used by default in the project and connect the Docker container.

There is also a “Configure for HTTPS” checkbox. When this check box is selected, the project will be launched over HTTPS by default during debugging and testing. In this case, setting and unchecking this check box is irrelevant. In addition, even if we set this mark, then later through the project properties, you can cancel the launch via HTTPS or, conversely, reinstall it.

Among these templates, we will select ASP.NET Core Empty, leave all the other values ​​by default and click on the OK button. And Visual Studio creates a new project:

Let’s take a look at the basic structure of a standard ASP.NET Core project. The ASP.NET Core Empty project contains a very simple structure – the minimum required to run the application:

  • Dependencies: all packages and libraries added to the project, in other words, dependencies
  • Properties: a node that contains some project settings. In particular, the launchSettings.json file describes the project launch settings, for example, the addresses at which the application will be launched.
  • Program.cs: the main file of the application, from which its execution begins. The code of this file configures and starts the web host within which the application is deployed.
  • Startup.cs: the file that defines the Startup class and which contains the logic for handling incoming requests

ASP Frequently Asked Questions

Yes, but applications can run on Linux, macOS, Docker, and a range of Windows versions. ASP.NET supports Windows XP, Vista SP2, Windows 7 SP1, Windows 8 / 8.1 and selected versions of Windows 10.

ASP.NET can be used to create HTML, CSS, JS, XML and any other scripts. ASP.NET uses the Common Language Runtime framework. This means that server side programming can be done in any of the CLI languages ​​such as C #, Visual Basic, C ++.

ASP is an older framework. Asp.net is its new counterpart. The original ASP (Active Server Pages) was an early web development system released by Microsoft in the mid-1990s. Programming was carried out mainly in the VBscript or JScript languages. ASP.NET was created in 2002 on the .NET platform.

Some alternative web applications for ASP.NET include available development frameworks such as Ruby on Rails, Django (Python) PHP. However, in ASP.NET, most of them require that all or most of the programs be executed in the same language and rely on script rather than compiled code. There’s also Maverick.NET, Entity Framework, and ASP.NET MVC, an open source framework also made by Microsoft.

ASP.NET is a good option for building complex web applications that need to maximize interoperability with existing Microsoft components.

ASP.NET is a good platform for middle and senior programmers with extensive experience in building applications in the Windows environment.

Serious drawback – work only on Microsoft servers. Despite the Mono project, an open source cross-platform that is ASP.NET compatible and can run on Linux, the issue has not been completely resolved. After all, attachment to the OS and the server from Microsoft increases the cost of services.

With ASP.NET, development can be done in multiple languages. It is convenient for small development teams, captivates with the simplicity of writing code, with a large number of components available for rapid application development.