Skip to main content

Posts

Showing posts from 2022

ASP.NET Core Advanced Interview Questions - Part -1

  1)          In ASP.NET Core what CreateHostBuilder will do? In Program.cs, this is the very first thing happening in the application, this function will create object for the host and based on the host object the subsequent processes will happen like creating a scope, creating services objects, etc. 2)          What is host in ASP.NET Core? As a first step the ASP.NET Core apps configure and launch a host. The host is responsible for app startup and lifetime management. Ideally, the host configures a server and a request processing pipeline. The host can also set up logging, dependency injection, and configuration. 3)          What is the purpose of Program.cs in ASP.NET Core? This is the entry point of the ASP.NET Core application where the program will build the host object and create scope of the application 4)          What is Scope in ASP.NET Core? In ASP.NET Core, we can create and manage custom scopes by calling CreateScope() when for the need of custom services