Rajdip Khavad Logo
Rajdip Khavad
Back to all case studies
.NET & Cloud ArchitectureProduction Case Study

Legacy ASP.NET Monolith Modernization with YARP & .NET 8

Incremental strangler-fig modernization of an enterprise .NET Framework monolith into high-performance .NET 8 microservices using Microsoft YARP reverse proxy.

DomainFinancial Infrastructure Group
Engineering RoleSolutions Architect & .NET Lead
Completed2026-07-05
Core StackAngular 15, ASP.NET Core, .NET 8, YARP, Docker
4.5xThroughput Increase
< 25msLatency P99
100%Zero Downtime Migration
Legacy ASP.NET Monolith Modernization with YARP & .NET 8

Figure 1: High-level architectural overview and system topology.

Project Context & Challenge

The Engineering Challenge

The legacy ERP monolith was built with ASP.NET MVC on .NET Framework 4.7. The application suffered from slow release cycles, lacked unit test coverage, and was locked into expensive Windows Server hosting. Upgrading the entire application at once was too risky due to its large size and active business operations. The objective was to modernize the application incrementally with minimal downtime.

My Role: My role was as a Senior .NET Developer. I was responsible for designing and implementing the incremental migration pathway using YARP, decoupling session state from IIS to Redis, configuring single sign-on between legacy and modern modules, and containerizing services for Docker deployment.
System Design & Architecture

Architecture & Core Components

•**Architectural Style:** Monolith to Microservices / strangler-fig migration pattern
•**Reverse Proxy:** YARP (Yet Another Reverse Proxy)
•**Target Backend:** ASP.NET Core Web API, .NET 8
•**Legacy Backend:** ASP.NET MVC / .NET Framework 4.7
•**Frontend:** Angular 15 (replacing old Razor Views)
•**Session/Cache:** Redis Session State
•**Database:** SQL Server (shared schema during migration phase)
•**Deployment / Infrastructure:** Docker Containers, Azure Kubernetes Service (AKS)
Strangler Fig Migration Architecture with YARP

Figure 2: Incremental Strangler Fig migration topology utilizing Microsoft YARP reverse proxy to route traffic between legacy and modern services.

Cross-Framework Single Sign-On Architecture

Figure 3: Shared authentication mechanism translating legacy ASP.NET Forms Authentication cookies into modern JWT bearer tokens.

Deep-Dive Engineering

Key Engineering Challenges & Solutions

Challenge 01

Incremental Migration Routing

Problem & Constraints:

Porting components incrementally without splitting the domain URL or causing downtime.

Engineered Solution:

Implemented YARP as a reverse proxy at the front gate. YARP inspected route patterns, forwarding traffic to the new Angular/ASP.NET Core containers for migrated modules, and routing back to the legacy IIS application for non-migrated endpoints.

Production Impact:

Enabled seamless page routing between old and new architectures under a single domain name, allowing modules to be deployed independently.

Challenge 02

Single Sign-On and Shared Sessions

Problem & Constraints:

Maintaining user identity and session persistence when routing between the legacy .NET Framework session states and the modern .NET 8 stateless JWT tokens.

Engineered Solution:

Decoupled sessions from in-memory IIS state to Redis. Built a token exchange service in ASP.NET Core that decrypted the legacy Forms Authentication cookie using shared machine keys and generated equivalent JWT access tokens for the Angular client.

Production Impact:

Users navigated across legacy pages and newly migrated Angular dashboards with a single sign-on state.

Technical Trade-offs

Architectural Decisions & Trade-offs

**Strangler Fig Pattern via YARP:** Selected YARP as the gateway router. This enabled incremental feature deployment, reducing release risks, though it added complexity in maintaining shared database schemas and backward compatibility during migrations.

Performance, Scalability & Security

Performance & Scale
  • •Modernized .NET 8 endpoints achieved a significant throughput improvement.
  • •Dashboard response times and time-to-first-byte (TTFB) were reduced significantly.
  • •Hosting expenses were optimized, reduced infrastructure overhead by transitioning from dedicated Windows servers to Linux containers.
Security Governance
  • •Re-encryption of shared machine keys.
  • •JWT bearer token validation on modernized APIs.
  • •Enforced HTTPS termination at the YARP gateway.

Outcomes & Lessons Learned

The legacy monolithic modules were successfully migrated to modern ASP.NET Core running on AKS, improving release frequencies and reducing server infrastructure costs.

  • The Strangler Fig pattern using YARP is highly effective to de-risk monolith migrations by converting big-bang rewrites into manageable, modular releases.
  • Unifying security contexts (SSO) early in the project is critical for user retention during multi-month migration schedules.

Related Case Studies

Rajdip Khavad

About Rajdip Khavad

Rajdip Khavad is a Senior Full-Stack & Frontend Engineer specializing in Angular, ASP.NET Core, enterprise application architectures, scalable integrations, and high-performance web systems.