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

πŸ“š Interview question

What are the main Azure services a .NET team uses day to day, and what is each one for? Walk me through where a typical ASP.NET Core API, its database, secrets, files, messages and telemetry would live in Azure.

The core Azure services for a .NET 10 workload (compute, Azure SQL, Storage, Key Vault, Service Bus, App Configuration, Application Insights and Azure Monitor) and how they fit together.

Beginner Theory Beginner app-service application-insights azure azure-sql devops key-vault

🎯 Key points

  • Compute: App Service, Azure Functions, Container Apps, AKS
  • Azure SQL Database for relational data, Entra ID authentication
  • Blob Storage for files, Queue Storage for simple queues
  • Key Vault for secrets, keys and certificates; App Configuration for settings and feature flags
  • Service Bus for reliable messaging; Event Grid for event routing
  • Application Insights on Azure Monitor and Log Analytics for telemetry
  • Managed identity instead of connection strings and keys
  • Australia East / Southeast regions for data residency

⏱ 30-second answer

A typical .NET team uses a small, repeatable set of Azure services:

  • Compute: App Service for web apps and APIs, Azure Functions for event-driven code, Container Apps or AKS for containers.
  • Data: Azure SQL Database for relational data, Blob Storage for files, and Azure Managed Redis (the successor to Azure Cache for Redis) for caching.
  • Platform: Key Vault for secrets and certificates, App Configuration for settings and feature flags, Service Bus for messaging, Application Insights (on Azure Monitor) for telemetry.

Everything is wired together with managed identity and Entra ID RBAC, not connection strings, and deployed with infrastructure as code. The trade-off: managed PaaS services remove patching and plumbing, but you accept each service's limits, pricing model and region availability.

πŸ—£ Full answer (senior)

How I would answer this in an interview

"I think of Azure for a .NET team in layers. Compute is where the code runs: App Service for a normal ASP.NET Core API, Azure Functions when the work is triggered by events like a queue message or a timer, and Container Apps or AKS when the team ships containers. Data is Azure SQL Database for the relational model, Blob Storage for files like PDFs and uploads, and a Redis cache (Azure Managed Redis, or Azure Cache for Redis on older estates) in front of the database for frequently read data such as product catalogues or reference data.

Then there are the platform services that every app needs. Key Vault holds secrets, keys and TLS certificates. App Configuration holds non-secret settings and feature flags. Service Bus carries messages between services reliably, and Event Grid routes events such as 'a blob was created'. Application Insights, which sits on Azure Monitor and Log Analytics, collects requests, dependencies, exceptions and traces, usually through the OpenTelemetry-based Azure Monitor distro. The glue is managed identity: the app gets an Entra ID identity, and I grant it roles like Key Vault Secrets User instead of pasting a connection string anywhere. All of it is created from Bicep or Terraform, never by clicking in the portal.

The mistake I see is teams treating Azure as 'a VM somewhere' and keeping secrets in appsettings.json or app settings. The point of PaaS is that Azure runs the plumbing, so my job is choosing the right service and wiring identity, networking and monitoring properly. For an Australian client I'd also deploy to Australia East, with Australia Southeast for disaster recovery, so the data stays onshore."


Where a typical API lives

Concern Azure service .NET package
Run the API App Service (or Container Apps) none, just deploy
Relational data Azure SQL Database Microsoft.EntityFrameworkCore.SqlServer
Files Blob Storage Azure.Storage.Blobs
Cache Azure Managed Redis Microsoft.Extensions.Caching.StackExchangeRedis, HybridCache
Secrets, certificates Key Vault Azure.Extensions.AspNetCore.Configuration.Secrets
Settings, feature flags App Configuration Microsoft.Extensions.Configuration.AzureAppConfiguration, Microsoft.FeatureManagement
Messages Service Bus Azure.Messaging.ServiceBus
Background jobs on events Azure Functions Microsoft.Azure.Functions.Worker
Telemetry Application Insights / Azure Monitor Azure.Monitor.OpenTelemetry.AspNetCore
Identity Entra ID + managed identity Azure.Identity

Similar services that confuse beginners

Pair Difference
Key Vault vs App Configuration Secrets vs settings; App Configuration can reference Key Vault secrets
Queue Storage vs Service Bus Simple cheap queue vs full broker (topics, sessions, dead-lettering, transactions)
Event Grid vs Event Hubs Routing discrete events vs ingesting high-volume streams
Application Insights vs Azure Monitor App telemetry is one part of Azure Monitor; both store data in Log Analytics

Production example

A standard setup is one App Service plan running the API in Australia East, Azure SQL, a storage account, Key Vault and Application Insights, all reached with a system-assigned managed identity. A team can stand that up from one Bicep file in under 15 minutes, and it removes every secret from source control, which is also one of the easiest wins against the ACSC Essential Eight.

πŸ” What the interviewer is checking

Checks that the candidate knows the standard Azure building blocks for a .NET app and how they connect, not just the names.

Green flags

  • Groups services by purpose (compute, data, platform, telemetry)
  • Mentions managed identity and Key Vault instead of connection strings
  • Knows the difference between similar services (Queue Storage vs Service Bus)
  • Mentions region choice and Australian data residency

Red flags

  • Lists services with no idea what each is for
  • Puts secrets in configuration files
  • Thinks every app needs AKS

πŸ“š Learn in depth

1. IaaS, PaaS and serverless

Azure services sit on a spectrum of how much Azure manages for you:

You manage more                                   Azure manages more
|-- VMs (IaaS) --|-- AKS --|-- Container Apps --|-- App Service --|-- Functions --|
   OS, patching     nodes,     containers only      code only        code + scale

The further right you go, the less you operate, but the more you accept the platform's limits (timeouts, supported runtimes, networking options).

2. Resource hierarchy

Entra ID tenant
  └── Management groups
        └── Subscriptions (billing and quota boundary)
              └── Resource groups (lifecycle boundary)
                    └── Resources (App Service, SQL, Key Vault ...)

RBAC roles and Azure Policy can be assigned at any level and inherit downward. Teams usually use one resource group per app per environment, such as rg-orders-prod-aue.

3. Control plane and data plane

Every service has two surfaces. The control plane (Azure Resource Manager, management.azure.com) creates and configures resources. The data plane is the service itself: reading a secret, writing a blob, running a query. Roles are separate too: Contributor can create a storage account but cannot read blobs; Storage Blob Data Reader can. Beginners hit this when a 'Contributor' still gets 403 reading data.

4. How a .NET app authenticates

App Service ──(1) request token──▢ local managed identity endpoint
            ◀─(2) Entra ID access token (audience = vault.azure.net)
            ──(3) GET secret + Bearer token──▢ Key Vault
                                               checks RBAC role

Azure.Identity does this for you through DefaultAzureCredential or ManagedIdentityCredential, caches the token and refreshes it before expiry.

5. Regions and Australia

Australia East (Sydney) has availability zones and is the usual primary region. Australia Southeast (Melbourne) is its paired region for disaster recovery. Australia Central and Central 2 (Canberra) target government workloads. Keeping personal information onshore makes Privacy Act obligations simpler, especially APP 8 on cross-border disclosure.

Try it yourself

  1. Create a resource group in Australia East with az group create -n rg-demo-aue -l australiaeast.
  2. Deploy a minimal API to App Service with az webapp up --runtime "DOTNETCORE:10.0".
  3. Turn on the system-assigned identity and grant it Key Vault Secrets User on a new vault, then read a secret through configuration.
  4. Add Azure.Monitor.OpenTelemetry.AspNetCore and find your requests in Application Insights.
  5. Delete the resource group and check Cost Management the next day to see what it cost.

πŸ’» Code

A minimal .NET 10 API wired to Key Vault, Blob Storage and Application Insights with managed identity (no connection strings):

using Azure.Identity;
using Azure.Monitor.OpenTelemetry.AspNetCore;
using Azure.Storage.Blobs;
using Microsoft.Extensions.Azure;

var builder = WebApplication.CreateBuilder(args);

// One credential for every Azure client: managed identity in Azure, your az login locally.
var credential = new DefaultAzureCredential();

// Key Vault secrets become ordinary configuration keys (Db--Password -> Db:Password).
builder.Configuration.AddAzureKeyVault(
    new Uri(builder.Configuration["KeyVault:Uri"]!), credential);

// Register Azure SDK clients once, as singletons, with the same credential.
builder.Services.AddAzureClients(clients =>
{
    clients.AddBlobServiceClient(new Uri(builder.Configuration["Storage:BlobUri"]!));
    clients.UseCredential(credential);
});

// Requests, dependencies and logs go to Application Insights via OpenTelemetry.
builder.Services.AddOpenTelemetry().UseAzureMonitor();

var app = builder.Build();

app.MapGet("/files/{name}", async (string name, BlobServiceClient blobs, CancellationToken ct) =>
{
    var blob = blobs.GetBlobContainerClient("documents").GetBlobClient(name);
    return await blob.ExistsAsync(ct)
        ? Results.Stream(await blob.OpenReadAsync(cancellationToken: ct))
        : Results.NotFound();
});

app.Run();
{
  "KeyVault": { "Uri": "https://kv-orders-prod-aue.vault.azure.net/" },
  "Storage": { "BlobUri": "https://stordersprodaue.blob.core.windows.net/" }
}

⚠ Common mistakes

  • Mistake: Storing connection strings and keys in appsettings.json or app settings. Why it is wrong: They leak through source control, logs and screenshots, and rotating them is manual. Instead: Use managed identity and Entra ID RBAC; keep the few unavoidable secrets in Key Vault.
  • Mistake: Picking AKS by default because it sounds enterprise. Why it is wrong: A team of five ends up running a cluster instead of shipping features. Instead: Start with App Service or Container Apps and move only when you need what they lack.
  • Mistake: Using Queue Storage where you need dead-lettering, topics or ordering. Why it is wrong: Queue Storage has none of those; you end up rebuilding them badly. Instead: Use Service Bus for business messaging.
  • Mistake: Giving the app Contributor and expecting it to read secrets or blobs. Why it is wrong: Contributor is a control-plane role; data access needs data-plane roles. Instead: Grant Key Vault Secrets User or Storage Blob Data Reader on the specific resource.
  • Mistake: Deploying to a US region because it was the portal default. Why it is wrong: Higher latency for Australian users and harder Privacy Act compliance. Instead: Deploy to Australia East, with Australia Southeast for disaster recovery.
  • Mistake: Leaving Application Insights on full ingestion with verbose logging. Why it is wrong: Log Analytics ingestion is billed per GB and can become the biggest line on the bill. Instead: Set log levels, sampling and a daily cap.
  • Mistake: Creating resources by hand in the portal. Why it is wrong: Environments drift, nobody can recreate production after an incident, and reviews are impossible. Instead: Define every resource in Bicep or Terraform and deploy it from a pipeline.
  • Mistake: Keeping in-memory state (sessions, caches, file uploads on local disk) in an app that will scale out. Why it is wrong: With two or more instances, users hit a different instance and lose state; moving to containers or Functions later breaks it completely. Instead: Keep the app stateless and put state in Azure SQL, Redis or Blob Storage from day one.

πŸ› Senior insight: trade-offs

The senior view is that the service list matters less than the defaults you set around it: one identity model (managed identity everywhere), one standard telemetry pipeline (OpenTelemetry instrumentation exporting to Azure Monitor and Application Insights), one IaC tool with every resource in code, and a naming and tagging convention so cost and ownership are visible. Those decisions outlive any single service choice, and they are what lets an estate grow from one API to twenty without becoming unmanageable.

Option When it fits Cost When not to
App Service Standard web apps and APIs Low ops, pay per plan Many small services, scale to zero
Container Apps Containerised microservices, event scaling Pay per use, scale to zero You need full Kubernetes APIs
AKS Many services, platform team, custom networking Highest ops Small team, few services
Functions Event-driven, spiky work Pay per execution Long-running stateful APIs

πŸ”— Follow-ups the interviewer may ask

  1. When: Candidate mentions Key Vault and App Configuration Why: Checks they can move real settings and secrets into those services and handle rotation and refresh
    How to answer

    I'd inventory and classify every setting first: secrets, environment-specific values, shared values, and which must change live. Secrets go to Key Vault. Non-secret settings and feature flags go to Azure App Configuration with a label per environment, and secrets are referenced from there through Key Vault references. The app authenticates with its managed identity using least-privilege roles, and where possible secrets disappear entirely through passwordless Entra ID auth to SQL, Storage and Service Bus.

    For refresh, use a sentinel key with a refresh interval and a secret refresh interval, and read live values through IOptionsMonitor. Rotation uses overlapping versions, so old and new both work during the window. Add start-up timeouts and replicas, and keep ValidateOnStart.

    The trade-off: central, audited, rotatable configuration, in exchange for a network dependency at start-up that you must design for.

  2. When: Candidate mentions Service Bus for messaging Why: Checks they can compare Service Bus with other brokers and justify the choice
    How to answer

    Service Bus, RabbitMQ and SQS are queue brokers: a message is delivered, settled and gone. Kafka is a partitioned, retained log: messages stay for the retention period and each consumer group tracks an offset, so you can replay.

    • Ordering: Service Bus sessions, SQS FIFO message groups, Kafka per partition; RabbitMQ only per queue with a single consumer.
    • Guarantees: all are at-least-once in practice, so consumers deduplicate.
    • Operations: Service Bus and SQS are fully managed; RabbitMQ and self-hosted Kafka need a team (or Confluent Cloud / Event Hubs' Kafka endpoint).

    For a .NET system on Azure doing commands and business events, I default to Service Bus. I pick Kafka when I need high-volume streaming and replay. The trade-off is features and simplicity versus throughput and history.

  3. When: Candidate says Key Vault secrets become configuration keys Why: Checks they understand configuration provider order and how Azure settings override appsettings.json
    How to answer

    ASP.NET Core configuration is a layered key-value store. IConfiguration merges an ordered list of providers into one flat, case-insensitive dictionary. WebApplication.CreateBuilder adds, in order: appsettings.json, appsettings.{Environment}.json, user secrets (only in Development), environment variables and command-line arguments. When two providers set the same key, the one added last wins, so an environment variable on the server overrides the JSON file you shipped.

    • Hierarchy is flattened with :, e.g. ConnectionStrings:Default.
    • Environment variables use __ instead, e.g. ConnectionStrings__Default, because : is not allowed in Linux variable names.

    The trade-off: layering lets one build artifact run everywhere, but a value can come from five places, so you need to know the order to find out which one won.

↩ Usually asked after

More in Azure

Last updated 23 Nov 2026.

🌐 Sangam's Webring

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