New Time Tracker for Azure DevOps- track developer hours directly inside work items. No ghosted hours. Learn More
logo

How to Migrate a Legacy .NET App to Azure

To migrate a legacy .NET app to Azure, you move your .NET Framework codebase to App Service, Azure SQL, and Key Vault using a strangler-fig pattern that routes traffic to new slices while the old app keeps running. No big-bang rewrite required.

What you need before you start

Gather the following before writing a line of migration code. For related Azure migration patterns, see the QServices guides hub.

Review the official Microsoft .NET porting documentation for a framework-version compatibility checklist before your first session.

Step-by-step: migrate a legacy .NET app to Azure

  1. Inventory the app. Run the .NET Upgrade Assistant against the solution to generate a compatibility report. Document the framework version, every NuGet package that lacks a .NET 8 equivalent, all external integration points, and the data integrity rules buried in stored procedures or application code. Missing a single integrity rule here is the most common cause of silent data corruption later in the migration.
  2. Pick a migration strategy per component. Classify each module as rehost (lift-and-shift to Azure App Service on a Windows plan or Azure VMs), replatform (port to .NET 8 with minimal code changes and run on Linux App Service), or rebuild (rewrite a bounded slice as a clean .NET 8 service on Azure Container Apps). Document the rationale for every decision. Teams revisit these choices when timelines slip, and having the reasoning on record prevents scope creep.
  3. Apply the strangler-fig pattern. Place an API gateway (Azure API Management or Ocelot) in front of both the legacy app and the new service endpoints. Route specific URL paths to the modernized slices; all other traffic falls through to the legacy app. The legacy system stays live throughout. Never decommission the old app until the replacement slice has processed real production traffic for at least two weeks.
  4. Stand up Azure foundations. In the target resource group, provision Azure App Service (or Azure Container Apps for containerized workloads), Azure SQL migrated from your on-premises SQL Server, Azure Key Vault for all secrets and connection strings, and your chosen API gateway. Define all infrastructure as Bicep or ARM templates from day one so the environment is fully reproducible. Store no credentials in application configuration files; use Key Vault references only.
  5. Migrate data with integrity rules intact. Use Azure Database Migration Service or a scripted SQL export to move data to Azure SQL. Before routing any live traffic to the new environment, run old and new databases in parallel and compare outputs from identical transactions. Every stored procedure, trigger, and constraint must produce the same result in Azure SQL as it did on-premises. Advance only after parity is confirmed.
  6. Cut over slice by slice, monitor, and decommission. Shift production traffic to each modernized slice via the API gateway. Monitor Application Insights for error rate and latency regressions. Hold the previous slice in standby for at least 48 hours before decommissioning. Repeat per slice. Remove legacy components only after the final slice has been stable in production.

App Service vs. Container Apps: choosing the right compute target

The right Azure compute target depends on whether you are replatforming an existing monolith or rebuilding into independent services. Use the table below as a starting point.

Criteria Azure App Service Azure Container Apps
App type Single app or simple multi-tier .NET site Multiple independently deployable services
Windows dependency Supported via Windows plan Linux containers only
Scaling model Scale out to N instances per app KEDA-based autoscaling per container
Operations overhead Lower: PaaS with no container runtime to manage Higher: requires Docker images and a container registry
Best fit for Rehost or replatform of a single monolith Rebuilt microservices or strangler-fig slices

If your app has Windows-only dependencies such as COM interop or IIS-bound Windows Authentication, start with App Service on a Windows plan. Containerizing those dependencies in the first migration pass adds weeks of unrelated work. You can move to Container Apps in a later phase once those dependencies are resolved.

Where this gets tricky

The big-bang rewrite. Teams scope a full .NET 8 rewrite from the start, spend six months building it, and then face a risky single cutover with no fallback path. The strangler-fig approach keeps the legacy app live until each new slice has proven itself in production. If your team is debating a full rewrite, see our Legacy System Modernization page for an honest look at phased-versus-big-bang cost and risk differences.

Leaving data integrity rules behind. A schema migration moves tables and columns. It does not automatically move a trigger that enforces a uniqueness constraint or application code that validates a business rule before writing to the database. Those rules need to be explicitly identified during the inventory step, re-implemented in the new environment, and verified through parallel data comparison before any traffic is switched. You find out about missing rules through corrupted production data, not a failing test.

Underestimating the integration surface. Every system that touches your app is a potential cutover blocker. Legacy systems on fixed-IP whitelists, SFTP file drops, and synchronous batch jobs all need explicit migration plans. Systems that appear read-only often write back through obscure paths that only surface under load.

How QServices handles .NET-to-Azure migrations

QServices has delivered .NET-to-Azure modernizations across manufacturing, wealth management, and enterprise software, including a VB.NET monolith-to-.NET 8 migration for a global EHS platform and a cloud migration for a stock analytics platform that replaced manual spreadsheets with an Azure-hosted dashboard delivering real-time financial metrics.

A standard engagement runs 16 to 52 weeks depending on integration complexity, with total cost typically between $60,000 and $500,000. We apply the strangler-fig approach by default. Every step that touches production data goes through a human review gate before cutover proceeds. This is a direct application of our Human-in-the-Loop governance model, where a human approves each high-stakes decision before it executes.

For a project-specific estimate, see our Legacy Modernization cost page or contact us directly.

Case Study

Global EHS Platform Modernization: VB.NET Monolith to .NET 8 and React

Global Environmental Health and Safety software company

Improved scalability, maintainability, and global performance after rewriting a legacy VB.NET monolith

Streamlined Management of Change, Incidents and Events, Action Items, LMS training, and automated scheduling in a single platform

.NET 8ReactAzureAxios REST Client

Is App Service or Container Apps cheaper for a migrated .NET app?

App Service is typically cheaper for a single migrated .NET application. The Basic and Standard tiers cost less than Container Apps at low traffic volumes, and you avoid the Docker build pipeline overhead. Container Apps becomes cost-competitive when you have multiple independently scalable services, where scaling idle services to zero while others stay warm reduces compute cost compared to keeping a full App Service plan reserved at all times.

Ready to discuss your project?

Share your requirements with QServices. Our engineers will give you a straight answer on fit, timeline, and cost — no sales scripts.

Book a Free Consultation
Frequently Asked Questions
How long does it take to migrate a .NET app to Azure? +
Timeline depends on application complexity and integration surface. A straightforward replatform of a small .NET Framework app to Azure App Service can take 4 to 8 weeks. A full legacy-to-.NET 8 migration with multiple integrations typically runs 16 to 52 weeks. The strangler-fig approach, migrating slice by slice, keeps risk manageable throughout.
What is the strangler-fig pattern for .NET migration? +
The strangler-fig pattern places an API gateway (Azure API Management or Ocelot) in front of both the legacy app and the new services. You route specific traffic paths to modernized slices and let everything else fall through to the legacy app. The old system stays live until the new one has proven itself, eliminating the risky all-or-nothing cutover of a big-bang rewrite.
Do I need to containerize my .NET app to run it on Azure? +
No. Azure App Service runs .NET applications directly without Docker. Containerization is optional and is worth considering when you have multiple independently deployable services or need KEDA-based autoscaling. For a straightforward monolith migration, App Service on a Windows or Linux plan is simpler and requires less operational overhead to get started.
How do I migrate SQL Server to Azure SQL during a .NET migration? +
Use Azure Database Migration Service for a managed online migration with minimal downtime. Before switching traffic, run old and new databases in parallel and compare transaction outputs to verify parity. Explicitly identify and re-implement every stored procedure, trigger, and application-enforced data integrity rule in Azure SQL before cutover. Missing a single rule is the most common cause of silent data corruption.
How much does a legacy .NET to Azure migration cost? +
Cost varies by scope. A medium-size migration of 200 to 600 developer hours typically runs $8,000 to $30,000. A full platform migration with multiple integrations ranges from $60,000 to $500,000. Add 15 to 25 percent for regulatory scope such as HIPAA or SOC 2, and $3,000 to $12,000 per non-trivial system integration. See our Legacy Modernization cost page for a detailed breakdown.
Book Appointment
Sahil kataria (1)
Sahil Kataria

Founder and CEO

amit Kumar
Amit Kumar

Chief Sales Officer

Talk To Sales

USA

+1 270-550-1166

flag

+1 270-550-1166

Phil J.
Phil J.Head of Engineering & Technology​
QServices Inc. undertakes every project with a high degree of professionalism. Their communication style is unmatched and they are always available to resolve issues or just discuss the project.​

Get Your Free 2026 Software
Buyer Demand Report

Based on 35,705 Upwork jobs, uncover
what software buyers want, where budgets are
growing, and where AI demand is highest.

Thank You

Your details has been submitted successfully. We will Contact you soon!