All fields

“Generic Host” in Information Technology

27 questions across 3 technologies.

Information Technology

27 questions in 3 technologies

#QuestionTechnologyTopicLevel
1What is the Generic Host in .NET, and what problem does it standardize across different application types? .NET › Generic Host.NETGeneric HostBeginner
2How does the Generic Host integrate configuration, logging, and dependency injection into a single unified builder? .NET › Generic Host.NETGeneric HostIntermediate
3How do you configure the Generic Host to read configuration from a custom file format or remote source before the rest of the application starts? .NET › Generic Host.NETGeneric HostIntermediate
4How does the Generic Host manage the application's startup and shutdown lifecycle, including handling OS signals like SIGTERM? .NET › Generic Host.NETGeneric HostAdvanced
5How would you build a console application that supports both interactive command execution and long-running hosted service behavior using the Generic Host? .NET › Generic Host.NETGeneric HostAdvanced
6How does the Generic Host's dependency validation (ValidateOnBuild and ValidateScopes) help catch DI configuration errors early? .NET › Generic Host.NETGeneric HostAdvanced
7How would you implement a startup task that must complete successfully before the Generic Host considers the application ready to serve traffic or process work? .NET › Generic Host.NETGeneric HostAdvanced
8How does the Generic Host's DI container differ from a full-featured third-party container in terms of the features it deliberately omits? .NET › Generic Host.NETGeneric HostAdvanced
9How does the Generic Host support hosting multiple independent hosted services with different failure isolation needs? .NET › Generic Host.NETGeneric HostAdvanced
10What does calling host.Run() versus host.RunAsync() do, and when would you use each? .NET › Generic Host.NETGeneric HostBeginner
11What is the difference between Host.CreateApplicationBuilder and the older Host.CreateDefaultBuilder? .NET › Generic Host.NETGeneric HostIntermediate
12What is IHostEnvironment, and how do you use it to conditionally configure services based on the current environment? .NET › Generic Host.NETGeneric HostIntermediate
13What is the role of IHostLifetime, and how does it differ across console applications, Windows Services, and containers? .NET › Generic Host.NETGeneric HostIntermediate
14How do you access the built IHost's service provider after Build() to resolve services outside the normal request/injection flow, such as in Program.cs itself? .NET › Generic Host.NETGeneric HostIntermediate
15How do you register configuration and services differently for a Worker Service running as a Windows Service or systemd daemon? .NET › Generic Host.NETGeneric HostIntermediate
16What is the difference between IHostedService and BackgroundService, and when would you implement IHostedService directly? .NET › Background Services.NETBackground ServicesBeginner
17What is the significance of the order of AddHostedService registrations relative to StartAsync execution, and can you control it? .NET › Background Services.NETBackground ServicesIntermediate
18What is IHostedLifecycleService, and how does it provide more granular hooks than IHostedService's StartAsync/StopAsync? .NET › Background Services.NETBackground ServicesAdvanced
19What does `dotnet new` do, and how do you list available project templates? .NET › .NET CLI, SDK & Project Structure (csproj).NET.NET CLI, SDK & Project Structure (csproj)Beginner
20What is a BackgroundService in ASP.NET Core, and what does it provide out of the box? .NET › Background Services.NETBackground ServicesBeginner
21How does graceful shutdown work for a BackgroundService, and what role does CancellationToken play? .NET › Background Services.NETBackground ServicesIntermediate
22How does a BackgroundService differ from a Worker Service project template, and how do they relate? .NET › Background Services.NETBackground ServicesIntermediate
23How do you register and run multiple independent BackgroundServices within the same application? .NET › Background Services.NETBackground ServicesIntermediate
24How should a BackgroundService handle a fatal startup dependency failure, such as being unable to connect to a required message queue at launch? .NET › Background Services.NETBackground ServicesIntermediate
25Explain the MAUI app startup and the role of MauiProgram. .NET MAUI › Fundamentals & Architecture.NET MAUIFundamentals & ArchitectureAdvanced
26Explain the MAUI app startup and the role of MauiProgram. .NET MAUI › Fundamentals & Architecture.NET MAUIFundamentals & ArchitectureAdvanced
27How would you implement a periodic timer-based background task more precisely than Task.Delay, avoiding cumulative drift? .NET › Background Services.NETBackground ServicesAdvanced