1325 questions for senior .NET engineer interviews, each with a 30-second answer, the full answer, a deep dive, the follow-ups interviewers ask next, and real-world production problems.
ASP.NET Core architecture, Kestrel, IIS and HTTP.sys hosting models, the Generic Host and WebApplicationBuilder, the middleware pipeline, endpoint routing, Minimal APIs, MVC controllers, Razor Pages and Razor Views.
What ASP.NET Core is and the end-to-end request path: Kestrel accepting the connection, HttpContext creation, the middleware pipeline, endpoint routing (UseRouting and endpoint execution), the endpoint delegate and the response flowing back out.
ASP.NET Core hosting models: Kestrel as an edge server, Kestrel behind a reverse proxy, IIS in-process and out-of-process via the ASP.NET Core Module (ANCM), and HTTP.sys, with when to choose each.
The .NET Generic Host and WebApplicationBuilder: default configuration sources, logging providers and DI registrations created by CreateBuilder, what Build() and Run() do, IHostedService start order, IHostApplicationLifetime events and how graceful shutdown works with HostOptions.ShutdownTimeout.
ASP.NET Core middleware: RequestDelegate, Use/Run/Map/MapWhen/UseWhen, the recommended built-in order, short-circuiting, and writing custom middleware as a convention-based class (singleton, scoped services via InvokeAsync parameters) or as IMiddleware (resolved from DI per request).
Diagnosing middleware ordering bugs in ASP.NET Core: authorisation before routing or missing, CORS registered after authentication or without a policy on the endpoint, UseExceptionHandler registered late or a started response, static files before authentication, and the tools to find them (logging, endpoint inspection, WebApplicationFactory tests).
Endpoint routing in ASP.NET Core: route templates, parameters, constraints and catch-alls, the matcher and route precedence rules, ambiguous matches, link generation with LinkGenerator and named routes, and endpoint metadata consumed by authorisation, CORS, rate limiting and OpenAPI.
Minimal APIs versus MVC controllers in .NET 10: programming model, binding and validation differences (built-in Minimal API validation in .NET 10), endpoint filters versus MVC filters, conventions, OpenAPI, Native AOT support, testability and how to choose.
Coding question on structuring a large Minimal API in .NET 10: feature folders with IEndpointRouteBuilder extension methods, MapGroup with shared prefixes, auth, tags and filters, static handler methods returning Results<T1, T2> via TypedResults, unit-testing handlers directly and integration-testing with WebApplicationFactory.
ASP.NET Core MVC: controllers, actions, IActionResult and ActionResult<T>, the [ApiController] behaviours (attribute routing requirement, automatic 400 ValidationProblemDetails, binding source inference, ProblemDetails for error codes), and Razor Pages (page model, handler methods) versus MVC with Razor Views.
Diagnosing 502/503 errors during rolling deployments of ASP.NET Core on Kubernetes or Container Apps: the SIGTERM and endpoint-removal race, preStop delays, readiness versus liveness probes, HostOptions.ShutdownTimeout versus terminationGracePeriodSeconds, Kestrel connection draining, keep-alive timeouts versus load balancer idle timeouts, and start-up readiness.
Kestrel server limits and tuning in .NET 10: connection limits, request body size and per-endpoint overrides, header limits, KeepAliveTimeout, RequestHeadersTimeout and MinRequestBodyDataRate, HTTP/2 stream and window settings, enabling HTTP/3 with QUIC, and how to find the real throughput bottleneck (ThreadPool, CPU, allocations, downstream I/O) with measurement.