Member-only story

ASP.NET Web Api Execution — Article: 4

iOS
2 min readOct 18, 2021

--

In the last article I explained the architecture of how .NET functions. In this article I will explain ASP.NET, object lifecycle, and how web APIs work in .net.

How does the application execute?

Before discussing the Startup.cs. file need to understand the application’s order of execution.

.NET Core order of execution

From the diagram above the starting point of the application is the Main method located in Program.cs. The Main method calls the CreateHostBuilder method which creates an asp.net core host to host the application and then calls the startup class to configure the application.

Program.cs

Application Startup

Startup class is the entry point to setting up configuration and wiring up services. Developers create a request pipeline in the Startup class that is used to handle all the requests made to the application. The application receives a Configuration file in ConfigureServices method to retrieve api-key’s for each name-type client.

--

--

iOS
iOS

Written by iOS

iOS Developer, Go, Java, C#, Blockchain enthusiast, Data junkie

No responses yet

Write a response