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.

Figure 1: High-level architectural overview and system topology.
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.
Architecture & Core Components

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

Figure 3: Shared authentication mechanism translating legacy ASP.NET Forms Authentication cookies into modern JWT bearer tokens.
Key Engineering Challenges & Solutions
Incremental Migration Routing
Porting components incrementally without splitting the domain URL or causing downtime.
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.
Enabled seamless page routing between old and new architectures under a single domain name, allowing modules to be deployed independently.
Single Sign-On and Shared Sessions
Maintaining user identity and session persistence when routing between the legacy .NET Framework session states and the modern .NET 8 stateless JWT tokens.
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.
Users navigated across legacy pages and newly migrated Angular dashboards with a single sign-on state.
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
- •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.
- •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

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.