All fields

“Configuration & Options Pattern” in Information Technology

71 questions across 4 technologies.

Information Technology

71 questions in 4 technologies

#QuestionTechnologyTopicLevel
1What is the Options pattern, and why is it preferred over injecting IConfiguration directly and reading string keys throughout an application? ASP.NET Core › Configuration & Options PatternASP.NET CoreConfiguration & Options PatternIntermediate
2What are Configuration and Options pattern in .NET Core? .NET Core › Configuration & Options Pattern.NET CoreConfiguration & Options PatternIntermediate
3How do you validate configuration options at application startup to fail fast on misconfiguration, using ValidateDataAnnotations and ValidateOnStart? ASP.NET Core › Configuration & Options PatternASP.NET CoreConfiguration & Options PatternAdvanced
4How does ASP.NET Core's configuration system layer multiple sources together, and what is the default provider precedence? ASP.NET Core › Configuration & Options PatternASP.NET CoreConfiguration & Options PatternBeginner
5How does named options support configuring multiple distinct instances of the same options class? ASP.NET Core › Configuration & Options PatternASP.NET CoreConfiguration & Options PatternIntermediate
6How does the configuration binder handle nested objects and arrays when binding a JSON section to a strongly-typed C# class? ASP.NET Core › Configuration & Options PatternASP.NET CoreConfiguration & Options PatternAdvanced
7How do environment variables map to nested configuration keys, given some shells don't support colons in variable names? ASP.NET Core › Configuration & Options PatternASP.NET CoreConfiguration & Options PatternIntermediate
8How does the command-line configuration provider let you override settings via arguments when running an application, and what's its precedence? ASP.NET Core › Configuration & Options PatternASP.NET CoreConfiguration & Options PatternIntermediate
9What is the difference between IOptions<T>, IOptionsSnapshot<T>, and IOptionsMonitor<T>, and which is safe to inject into a singleton? ASP.NET Core › Configuration & Options PatternASP.NET CoreConfiguration & Options PatternAdvanced
10How does configuration hot-reload work with reloadOnChange for appsettings.json, and what are its limitations? ASP.NET Core › Configuration & Options PatternASP.NET CoreConfiguration & Options PatternAdvanced
11How would you write a custom configuration provider to load settings from an unsupported source, like a remote configuration service or database? ASP.NET Core › Configuration & Options PatternASP.NET CoreConfiguration & Options PatternAdvanced
12How would you design configuration for a multi-tenant ASP.NET Core application where each tenant needs different settings resolved at runtime? ASP.NET Core › Configuration & Options PatternASP.NET CoreConfiguration & Options PatternAdvanced
13How do you write a custom IValidateOptions<T> implementation for validation logic beyond what DataAnnotations attributes can express? ASP.NET Core › Configuration & Options PatternASP.NET CoreConfiguration & Options PatternAdvanced
14How does appsettings.{Environment}.json layering work, and how does ASP.NET Core determine the current environment? ASP.NET Core › Configuration & Options PatternASP.NET CoreConfiguration & Options PatternIntermediate
15What is user secrets (dotnet user-secrets), and why should it be used only for local development, never production? ASP.NET Core › Configuration & Options PatternASP.NET CoreConfiguration & Options PatternIntermediate
16How do you use IHostEnvironment/IWebHostEnvironment to conditionally configure services based on the current environment? ASP.NET Core › Configuration & Options PatternASP.NET CoreConfiguration & Options PatternIntermediate
17What is the Options pattern, and why is it preferred over directly injecting IConfiguration into services? .NET › Configuration & Options.NETConfiguration & OptionsIntermediate
18How would you design configuration for a multi-tenant application where each tenant needs different settings resolved at runtime? .NET › Configuration & Options.NETConfiguration & OptionsAdvanced
19How does System.Text.Json's configuration (via AddJsonOptions) let you customize the default JSON serialization behavior globally? ASP.NET Core › Content Negotiation & Output FormattersASP.NET CoreContent Negotiation & Output FormattersIntermediate
20How does the Options pattern's IOptions<T>/IOptionsSnapshot<T> relate to and build upon the standard DI container? ASP.NET Core › Dependency InjectionASP.NET CoreDependency InjectionIntermediate
21What is the Options pattern's relationship to DI, and how does IOptions<T> itself get resolved through the container? .NET › Dependency Injection.NETDependency InjectionAdvanced
22How do you register a service using a factory delegate instead of a simple type mapping, when construction requires reading configuration or resolving other services conditionally? ASP.NET Core › Dependency InjectionASP.NET CoreDependency InjectionIntermediate
23How does hosting an ASP.NET Core application in a Docker container change considerations around Kestrel configuration and reverse proxying compared to traditional VM or bare-metal hosting? ASP.NET Core › Hosting Models: Kestrel, IIS & Reverse ProxiesASP.NET CoreHosting Models: Kestrel, IIS & Reverse ProxiesIntermediate
24What role does a reverse proxy play in TLS/SSL termination, and why is this pattern common in production deployments? ASP.NET Core › Hosting Models: Kestrel, IIS & Reverse ProxiesASP.NET CoreHosting Models: Kestrel, IIS & Reverse ProxiesIntermediate
25How do you manage different configurations for different environments (development, staging, production) using Maven profiles or Gradle's equivalent mechanisms? Java › Build Tools: Maven & GradleJavaBuild Tools: Maven & GradleIntermediate
26How would you use an enum to represent a fixed set of configuration keys combined with a shared lookup method, avoiding scattered String literal keys throughout a codebase? Java › EnumsJavaEnumsIntermediate
27What is the difference between role-based and claims-based authorization in ASP.NET Core? ASP.NET Core › AuthorizationASP.NET CoreAuthorizationBeginner
28What is IMemoryCache, and when is it appropriate for an ASP.NET Core application? ASP.NET Core › CachingASP.NET CoreCachingBeginner
29What is dependency injection, and how does ASP.NET Core's built-in DI container support it out of the box? ASP.NET Core › Dependency InjectionASP.NET CoreDependency InjectionBeginner
30How do you exclude a globally-registered filter from running on one specific action or controller? ASP.NET Core › FiltersASP.NET CoreFiltersBeginner
31What is Kestrel, and how does its role in ASP.NET Core hosting differ from a traditional web server like IIS? ASP.NET Core › Hosting Models: Kestrel, IIS & Reverse ProxiesASP.NET CoreHosting Models: Kestrel, IIS & Reverse ProxiesBeginner
32What is the difference between Kestrel's ListenAnyIP and Listen methods for binding to network addresses? ASP.NET Core › Hosting Models: Kestrel, IIS & Reverse ProxiesASP.NET CoreHosting Models: Kestrel, IIS & Reverse ProxiesBeginner
33How would you get the current date and time, and how does specifying an explicit ZoneId (versus relying on the system default) affect the result of LocalDate.now() or LocalDateTime.now()? Java › Java Date & Time API (java.time)JavaJava Date & Time API (java.time)Beginner
34How do you configure and use Redis as a distributed cache in ASP.NET Core with StackExchange.Redis? .NET › Caching (In-Memory, Distributed & Redis).NETCaching (In-Memory, Distributed & Redis)Intermediate
35How do feature flags decouple code deployment from feature release in a CI/CD workflow? .NET › CI/CD, Publishing & Deployment.NETCI/CD, Publishing & DeploymentIntermediate
36How do you combine multiple authorization requirements within a single policy, and how are they evaluated (AND vs OR logic)? ASP.NET Core › AuthorizationASP.NET CoreAuthorizationIntermediate
37How do you implement a periodic scheduled task using PeriodicTimer instead of Task.Delay, and what problem does it solve? ASP.NET Core › Background Tasks & Hosted ServicesASP.NET CoreBackground Tasks & Hosted ServicesIntermediate
38What is IDistributedCache, and how does it differ from IMemoryCache in a horizontally-scaled ASP.NET Core deployment? ASP.NET Core › CachingASP.NET CoreCachingIntermediate
39How does the newer Output Caching middleware (introduced in .NET 7) differ from Response Caching middleware? ASP.NET Core › CachingASP.NET CoreCachingIntermediate
40How does HybridCache (introduced in .NET 9) unify in-memory and distributed caching, and what problems does it solve? ASP.NET Core › CachingASP.NET CoreCachingIntermediate
41How do you configure Redis as the backing distributed cache for both IDistributedCache and Output Caching in the same application? ASP.NET Core › CachingASP.NET CoreCachingIntermediate
42How do you register multiple implementations of the same interface and resolve all of them together via IEnumerable<T>? ASP.NET Core › Dependency InjectionASP.NET CoreDependency InjectionIntermediate
43How do you apply a filter globally to every controller action, versus scoping it to a specific controller or individual action? ASP.NET Core › FiltersASP.NET CoreFiltersIntermediate
44How do you enable and use gRPC reflection for service discovery and debugging tools like grpcurl or Postman? ASP.NET Core › gRPC ServicesASP.NET CoregRPC ServicesIntermediate
45How do you implement a custom health check by implementing IHealthCheck, such as checking database connectivity? ASP.NET Core › Health ChecksASP.NET CoreHealth ChecksIntermediate
46How do you add pre-built health checks for common external dependencies like SQL Server, Redis, or a URL endpoint, using the community AspNetCore.Diagnostics.HealthChecks packages? ASP.NET Core › Health ChecksASP.NET CoreHealth ChecksIntermediate
47What is the difference between the in-process and out-of-process hosting models when running an ASP.NET Core application under IIS? ASP.NET Core › Hosting Models: Kestrel, IIS & Reverse ProxiesASP.NET CoreHosting Models: Kestrel, IIS & Reverse ProxiesIntermediate
48What is a self-signed certificate, and why is the ASP.NET Core development HTTPS certificate (dotnet dev-certs) not suitable for production use? ASP.NET Core › HTTPS, Certificates & Transport SecurityASP.NET CoreHTTPS, Certificates & Transport SecurityIntermediate
49How does the UseHttpsRedirection() middleware determine which port to redirect to, and how do you explicitly configure it when the HTTPS port isn't on the default 443? ASP.NET Core › HTTPS, Certificates & Transport SecurityASP.NET CoreHTTPS, Certificates & Transport SecurityIntermediate
50What is a Maven BOM (Bill of Materials), and how does it help manage consistent dependency versions across a multi-module project or organization? Java › Build Tools: Maven & GradleJavaBuild Tools: Maven & GradleIntermediate
51What is the significance of storing date-time values in UTC in a database or when transmitting between systems, rather than storing them in a specific local timezone? Java › Java Date & Time API (java.time)JavaJava Date & Time API (java.time)Intermediate
52What is Dependency Injection (DI) in .NET Core? How is it implemented? .NET Core › Dependency Injection in .NET Core.NET CoreDependency Injection in .NET CoreIntermediate
53What is Entity Framework Core (EF Core)? How is it different from EF6? .NET Core › Entity Framework Core.NET CoreEntity Framework CoreIntermediate
54How do you combine multiple version reader strategies (e.g., both URL segment AND header) to give clients flexibility in how they specify a version? ASP.NET Core › API VersioningASP.NET CoreAPI VersioningAdvanced
55How does JWT bearer authentication validate an incoming token, and what claims does TokenValidationParameters check? ASP.NET Core › AuthenticationASP.NET CoreAuthenticationAdvanced
56How do external identity provider integrations (like Google or Microsoft Entra ID) work using OAuth/OpenID Connect authentication handlers? ASP.NET Core › AuthenticationASP.NET CoreAuthenticationAdvanced
57How would you implement a custom IAuthorizationRequirement and IAuthorizationHandler for a business rule like 'only during business hours'? ASP.NET Core › AuthorizationASP.NET CoreAuthorizationAdvanced
58How would you design an authorization system supporting dynamically-configurable, admin-managed permissions rather than hardcoded policies in code? ASP.NET Core › AuthorizationASP.NET CoreAuthorizationAdvanced
59How would you implement a cron-like scheduled background job (e.g., 'run daily at 2 AM') without a third-party scheduling library? ASP.NET Core › Background Tasks & Hosted ServicesASP.NET CoreBackground Tasks & Hosted ServicesAdvanced
60How do you configure CORS to allow multiple specific known origins simultaneously, such as production, staging, and local development? ASP.NET Core › CORS (Cross-Origin Resource Sharing)ASP.NET CoreCORS (Cross-Origin Resource Sharing)Advanced
61What are keyed services (introduced in .NET 8), and what problem do they solve compared to injecting IEnumerable<T> when you need one specific implementation? ASP.NET Core › Dependency InjectionASP.NET CoreDependency InjectionAdvanced
62How does dependency injection integrate with minimal API endpoint handlers versus controller constructors? ASP.NET Core › Dependency InjectionASP.NET CoreDependency InjectionAdvanced
63How would you design exception handling to support internationalized (localized) error messages returned to different clients in their preferred language? ASP.NET Core › Error HandlingASP.NET CoreError HandlingAdvanced
64How does an IAsyncActionFilter differ from the synchronous IActionFilter, and why is the async version generally preferred for filters doing I/O work? ASP.NET Core › FiltersASP.NET CoreFiltersAdvanced
65How do you control the execution order of multiple filters of the same type applied to a single action? ASP.NET Core › FiltersASP.NET CoreFiltersAdvanced
66How would you integrate health check results with the AspNetCore.HealthChecks.UI package to get a persistent, historical dashboard view of health status over time? ASP.NET Core › Health ChecksASP.NET CoreHealth ChecksAdvanced
67What is YARP (Yet Another Reverse Proxy), and how does it compare to nginx or IIS as a reverse proxy option for ASP.NET Core applications? ASP.NET Core › Hosting Models: Kestrel, IIS & Reverse ProxiesASP.NET CoreHosting Models: Kestrel, IIS & Reverse ProxiesAdvanced
68How would you configure Kestrel to use a specific X.509 certificate for HTTPS, and what are the different ways to supply that certificate (file-based, certificate store, Azure Key Vault)? ASP.NET Core › HTTPS, Certificates & Transport SecurityASP.NET CoreHTTPS, Certificates & Transport SecurityAdvanced
69How would you implement Server Name Indication (SNI)-based certificate selection in Kestrel, serving different TLS certificates for different hostnames on the same IP/port? ASP.NET Core › HTTPS, Certificates & Transport SecurityASP.NET CoreHTTPS, Certificates & Transport SecurityAdvanced
70How would you handle adding behavior to an enum where the number of constants might grow very large or needs to be data-driven rather than hardcoded at compile time, and why might a class-based registry be more appropriate in that scenario? Java › EnumsJavaEnumsAdvanced
71What are .NET Core Hosting Models? .NET Core › .NET Core Hosting Models.NET Core.NET Core Hosting ModelsAdvanced