wasAsked.

have you done deployment of your .NET application? asked to explain process.

Capgemini · Full Stack Developer · technical

Published

Year not specified · .NET, DevOps

Community answers

Posted by wasAsked editorial collection

A good answer walks through a real pipeline step by step. A typical modern process for an ASP.NET Core application deployed to Azure looks like this: 1. Source control and branching - Code in Git (GitHub or Azure Repos). Pull requests to main require review and a passing build. 2. Continuous Integration - A pipeline (GitHub Actions or Azure Pipelines) runs on every pull request: dotnet restore, dotnet build -c Release, dotnet test (with coverage), code analysis and dependency vulnerability scanning. - On merge, it runs dotnet publish -c Release -o ./publish (or builds a Docker image) and stores the result as a versioned artifact. 3. Infrastructure and configuration - Infrastructure defined as code (Bicep or Terraform): App Service or Container Apps, database, Key Vault, Application Insights. - Environment-specific settings in App Service configuration; secrets in Key Vault, accessed through managed identity. 4. Continuous Deployment - Deploy the same artifact to Dev, then QA or Staging, then Production, with approval gates before Production. - Database migrations run as a separate step (EF Core idempotent migration script or migration bundle) before the new code, written to be backward compatible. - Zero-downtime release using a staging deployment slot: deploy to the slot, warm it up, run smoke tests, then swap with Production. 5. Verification and monitoring - Health check endpoints (/health) and automated smoke tests after deployment. - Application Insights dashboards and alerts on error rate and response time. 6. Rollback - Swap the slots back, or redeploy the previous artifact. Backward-compatible database changes make this safe. On-premises variant: publish the app, copy it to IIS servers (Web Deploy or a pipeline agent), install the ASP.NET Core Hosting Bundle, configure the application pool (No Managed Code), and use app_offline.htm or a load balancer to drain servers during deployment. In the interview, describe your actual project: which tool, how many environments, who approves releases, and one problem you solved (for example a failing migration or configuration difference between environments).

Ravindra Wadile · · 0 likes

Sign in to add your answer

Related interview topics