📁 Sangam Dhakal - Portfolio v2.0 - Netscape Navigator 4.0
_
□
×

πŸ“š .NET Interview Questions

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.

Phase 18 — Cloud and DevOps

Running .NET 10 in the cloud: the Azure services Australian employers use most (plus AWS equivalents), containers and Kubernetes, reverse proxies and gateways, CI/CD with GitHub Actions and Azure DevOps, and infrastructure as code.

  1. How would you use Docker Compose to run a .NET 10 API locally with SQL Server and Redis? Explain services, networks, volumes, health checks and depends_on, and when you would use .NET Aspire or Testcontainers instead.

    Docker Compose for local .NET development: compose.yaml services for the API, SQL Server and Redis, service-name DNS, named volumes, health checks with depends_on conditions, environment configuration, and the Aspire and Testcontainers alternatives.

    Junior Theory Containers Β· πŸ”— 3 follow-ups
  2. Explain the Kubernetes basics a .NET developer needs: pods, deployments, ReplicaSets, services, ingress (and the Gateway API), ConfigMaps and secrets. How does a request reach your ASP.NET Core container, and how does configuration get into it?

    Core Kubernetes objects for .NET developers (pod, deployment, ReplicaSet, service, ingress and Gateway API, ConfigMap, secret, probes), the request path to an ASP.NET Core container, and how configuration and secrets are injected.

    Intermediate Theory Containers Β· πŸ”— 3 follow-ups
  3. How should you set Kubernetes CPU and memory requests and limits for a .NET 10 service? Explain how the GC and the thread pool read container limits, what CPU throttling does to latency, when to use DOTNET_GCHeapHardLimit or GCHeapHardLimitPercent, and how you size a pod from measurements.

    Sizing .NET 10 pods: requests versus limits, QoS classes, how the runtime reads cgroup limits (ProcessorCount, GC heap hard limit at 75%), Server GC and DATAS, CFS CPU throttling and its latency impact, GC heap limit settings, and a measurement-driven sizing method.

    Mid-Level Theory Containers Β· πŸ”— 2 follow-ups Β· πŸ›  1 real-world
  4. A .NET 10 pod is stuck in CrashLoopBackOff, and another one is restarting with OOMKilled. Walk me through how you debug each with kubectl, logs and events, and how you tell an app startup failure from a probe misconfiguration or a memory problem.

    Debugging CrashLoopBackOff and OOMKilled .NET pods: kubectl describe, events, logs --previous, exit codes (1, 134, 137, 139), probe failures versus startup exceptions, missing configuration or identity, debug containers and dotnet-dump, and prevention.

    Mid-Level Debugging Containers Β· πŸ”— 3 follow-ups Β· πŸ›  1 real-world
  5. What is Helm and why would a .NET team use it? Explain charts, templates, values files per environment, releases, upgrades and rollback, and compare Helm with Kustomize. When would you choose each?

    Helm for deploying .NET services to Kubernetes: charts, Go templates, values per environment, releases and revision history, upgrade/rollback and hooks, OCI chart registries, and the trade-offs against Kustomize overlays.

    Mid-Level Theory Containers Β· πŸ”— 3 follow-ups Β· πŸ›  1 real-world
  6. Code review: a teammate submits a Dockerfile that builds and runs a .NET 10 API on the SDK image as root, plus a Kubernetes Deployment with one replica, no probes, no resource requests or limits, the latest image tag, and the database password in a plain env var. What do you flag, in what order, and what does the fixed version look like?

    Reviewing a .NET 10 Dockerfile and Kubernetes manifest: SDK image in production, root user, secrets in env vars, :latest tags, missing probes, missing requests/limits, single replica, shell-form entry point; findings ranked by severity with a rewrite and review close-out.

    Senior CodeReview Containers Β· πŸ”— 3 follow-ups Β· πŸ›  1 real-world
  7. How do you scale ASP.NET Core SignalR across several instances, and when would you choose Azure SignalR Service over a Redis backplane?

    Covers scaling ASP.NET Core SignalR across instances: sticky sessions, Redis backplane and Azure SignalR Service, and how to choose between them.

    Mid-Level Theory Reverse Proxy and Gateway
  8. What does a reverse proxy do in front of Kestrel? Explain TLS termination, routing, request buffering and limits, and whether a .NET 10 app still needs one now that Kestrel is a hardened, internet-facing server.

    Covers what a reverse proxy (Nginx, IIS, YARP, Azure Front Door, Application Gateway, Kubernetes ingress) does in front of Kestrel: TLS termination, routing, load balancing, buffering, limits and when you can expose Kestrel directly.

    Junior Theory Reverse Proxy and Gateway Β· πŸ”— 3 follow-ups
  9. Build a small API gateway with YARP in .NET 10. Explain routes, clusters and destinations, transforms, load balancing policies, and active and passive health checks, and how you would add authentication and rate limiting at the gateway.

    Covers building a gateway with YARP (Yarp.ReverseProxy): configuration-based routes and clusters, path transforms, load balancing policies, active and passive health checks, timeouts, and applying ASP.NET Core authorisation and rate limiting per route.

    Mid-Level Coding Reverse Proxy and Gateway Β· πŸ”— 3 follow-ups Β· πŸ›  1 real-world
  10. Nginx, IIS, YARP, Azure Front Door, Application Gateway and API Management can all sit in front of a .NET API. What does each one actually do, at which layer and scope, and how would you decide which ones a given system needs?

    Compares Nginx, IIS with the ASP.NET Core Module, YARP, Azure Front Door, Application Gateway (and Application Gateway for Containers), Azure Load Balancer and API Management by layer, scope and job, and how to choose a minimal layered edge for a .NET API in Azure.

    Mid-Level Theory Reverse Proxy and Gateway Β· πŸ”— 3 follow-ups Β· πŸ›  1 real-world
  11. You move an ASP.NET Core 10 app behind Nginx or Application Gateway. Now SignalR connections drop and fall back to long polling, file uploads over 1 MB fail with 413, a slow report endpoint returns 502 or 504, and rate limiting treats every user as one client. How do you diagnose and fix each?

    Diagnoses the common breakages after putting a reverse proxy in front of ASP.NET Core: WebSocket upgrade and idle timeouts for SignalR, sticky sessions, body size limits at each layer, layered request timeouts that cause 502/504, and forwarded headers for client IPs.

    Mid-Level Debugging Reverse Proxy and Gateway Β· πŸ”— 3 follow-ups Β· πŸ›  1 real-world
  12. You have a large ASP.NET Framework 4.8 application and a React SPA calling several APIs. How would you use YARP to migrate the legacy app to ASP.NET Core 10 incrementally with the strangler-fig pattern, and to build a backend-for-frontend that keeps tokens out of the browser? What are the risks?

    Covers YARP as an architectural tool: strangler-fig migration from ASP.NET Framework to ASP.NET Core 10 with MapForwarder and System.Web adapters (shared session and authentication), and a backend-for-frontend that uses cookies and attaches access tokens server-side, plus the risks and exit criteria.

    Senior Architecture Reverse Proxy and Gateway Β· πŸ”— 3 follow-ups Β· πŸ›  1 real-world
  13. How would you set up a canary release with an automatic latency gate for an ASP.NET Core API on Azure?

    Setting up a canary release with an automatic latency and error-rate gate for an ASP.NET Core API on Azure.

    Senior Theory CI/CD
  14. What is the difference between Git Flow and trunk-based development? Explain how each one uses branches, how releases work, and why most teams now prefer short-lived branches merged into main.

    Compares Git Flow and trunk-based development: branch types, release flow, merge pain, CI implications and why short-lived branches won.

    Junior Theory CI/CD Β· πŸ”— 2 follow-ups
  15. Write a GitHub Actions workflow for a .NET 10 API that builds, tests, publishes a container image and deploys it to Azure. How do you authenticate to Azure with OIDC instead of a stored secret, and how do you gate production?

    A GitHub Actions workflow for a .NET 10 API: restore, build, test, container publish to ACR, OIDC login to Azure, environment approvals and deployment to Container Apps or App Service.

    Intermediate Coding CI/CD Β· πŸ”— 3 follow-ups
  16. How do Azure DevOps Pipelines and GitHub Actions compare? Explain YAML pipelines, stages and jobs, environments and approvals in each, and how you would choose between them for a .NET team today.

    Compares Azure DevOps Pipelines and GitHub Actions: YAML structure, stages and jobs, templates and reusable workflows, environments, approvals and checks, service connections and OIDC, and how to choose.

    Intermediate Theory CI/CD Β· πŸ”— 3 follow-ups
  17. Compare rolling, blue-green and canary deployments, and Azure App Service deployment slots. What does each cost, how do you roll back with each one, and what does the database have to do to make any of them safe?

    Deployment strategies for .NET services: rolling, blue-green, canary and App Service slots or Container Apps revisions, their costs, rollback paths and the backward-compatible database changes they require.

    Mid-Level Theory CI/CD Β· πŸ”— 2 follow-ups Β· πŸ›  1 real-world
  18. How do feature flags work in .NET with Microsoft.FeatureManagement and Azure App Configuration? Explain how they separate deployment from release, the kinds of flags, targeting and percentage rollouts, and how you stop them turning into technical debt.

    Feature flags in .NET: Microsoft.FeatureManagement, Azure App Configuration, release vs ops vs experiment flags, filters and targeting, variants, refresh, testing and flag clean-up.

    Mid-Level Theory CI/CD Β· πŸ”— 2 follow-ups Β· πŸ›  1 real-world
  19. How do you handle secrets in CI/CD pipelines? Explain OIDC workload identity federation, Key Vault references and Key Vault-linked variables, least-privilege service connections, and what you do when a secret leaks in a pipeline log.

    Pipeline secret management for .NET on Azure: OIDC and workload identity federation instead of stored credentials, managed identity at run time, Key Vault references, least-privilege identities, secret scanning and leak response.

    Senior Theory CI/CD Β· πŸ”— 3 follow-ups Β· πŸ›  1 real-world
  20. Tell me about a deployment that broke production. How did you decide between rolling back and rolling forward, what did you do about database changes that had already run, and what did you change in the pipeline afterwards?

    A failed production deployment end to end: detection, the roll back vs roll forward decision, handling migrations that already ran, communication, and the pipeline and process changes that followed.

    Senior RealWorldScenario CI/CD Β· πŸ”— 3 follow-ups Β· πŸ›  1 real-world

🌐 Sangam's Webring

βͺ Previous 🏠 Main Next ⏩
πŸ’¬ Chat with me