Executing (running) the Razor Pages Web Application - ASP.NET Core 7 Part 2

ASP.NET Core 7: Executing (running) the Razor Pages Web Application using Visual Studio 2022



This is part 2 of the "Web App Development Beginners Guide" tutorial series. In this tutorial series, we will learn how to build a functional Web Application with individual account user login. We are using the project we created in the previous tutorial: ASP.NET Core 7: Creating A Razor Pages Web Application: Step-By-Step Guide 


Part 2: ASP.NET Core 7: Executing (running) the Razor Pages Web Application

In the previous tutorial, we created the ASP.NET Core 7 Razor Pages Web application using Visual Studio 2022. In this tutorial, we are going to learn about how to see, in other words, run the web application we created on the browser. 

Note: I have marked red labels in the pictures shown in this tutorial for explanation purposes, those red typing or numbers are not actually shown in the actual Visual Studio windows on your computer.


Figure 1: Wizard Created Project

The project is ready to execute(run). The top of the IDE contains most of the common commands in the Menu bar and the Toolbar. The IDE provides two main modes to run the application, debug or release. Debug mode is the default selection in the VS2022 IDE.


Figure 2: Debug commands in the top menu

Make sure that Debug and the Any CPU dropdown options are selected. And also note that the full green arrowhead button is for running the program with the debugging mode while the green outlined arrowhead button is for running the app without debugging. Also if there are no compile errors you can use Ctrl + F5 to run the program without debugging. 


Figure 3: Debug dropdown menu

Since we didn't change any code after creating the project using the ASP.NET Core Web application project there shouldn't be any errors. We can run the program to see the finished product.

To run the application without debugging select the Debug menu item and then select "Start Without Debugging" or use the shortcut keys Ctrl + F5

Once you run the App IDE will compile the program and then open the App in the Web browser. During the compilation, it will show up messages in the output window and some animations on the bottom blue status bar.


Figure 4: Build Started


Figure 5: Build completed and web server running

When running the App that we created using the selected ASP.NET Core Razor Pages Web Application template, Visual Studio 2022 builds the app by compiling the code. If there are no errors, it will start the default web server.


Figure 6: Webserver is running

After a few seconds, it shows the following website in the default web browser.


Figure 7: Generated website

So this completes the "Part 2: ASP.NET Core 7: Executing (running) the Razor Pages Web Application" tutorial. Hope this tutorial is a valuable introduction for those new to ASP.NET core and Visual Studio 2022 IDE.

Hope this helps you create an ASP.NET Core 7 Razor Pages Web Application. 

To learn more details about the application we created, please look at the next article:


Reference:

Links: Icon used 


Comments

Popular posts from this blog

Examining the Project structure - ASP.NET Core 7 Part 4

Getting Familiar with Visual Studio 2022 IDE - ASP.NET Core 7 Part 3

Displaying A Start Page In ASP.NET Core 3.1 Web API Project.