Upgrading a legacy, monolithic ASP.NET MVC application running on .NET Framework 4.7 to a modern, containerized ASP.NET Core and .NET 8 Web API architecture.
Project Context
- Business Domain: Enterprise Resource Planning (ERP) / Corporate Services
- Project Context: Incremental migration of an enterprise ERP monolithic application to modern .NET containerized microservices.
- Team Size: 3 engineers
- Period: May 2020 – July 2021
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.
The 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

- 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)
Technology Stack
Frontend
- Angular 15
- TypeScript
Backend
- ASP.NET Core (.NET 8)
- ASP.NET MVC (.NET Framework 4.7)
- YARP
- Redis Session State
Data
- SQL Server
Infrastructure
- Docker
- Azure Kubernetes Service (AKS)
Key Engineering Challenges
Challenge 1: Incremental Migration Routing
- Challenge: Porting components incrementally without splitting the domain URL or causing downtime.
- 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.
- Engineering Impact: Enabled seamless page routing between old and new architectures under a single domain name, allowing modules to be deployed independently.
Challenge 2: Single Sign-On and Shared Sessions

- Challenge: Maintaining user identity and session persistence when routing between the legacy .NET Framework session states and the modern .NET 8 stateless JWT tokens.
- 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.
- Engineering Impact: Users navigated across legacy pages and newly migrated Angular dashboards with a single sign-on state.
Technical 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
- 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
- Re-encryption of shared machine keys.
- JWT bearer token validation on modernized APIs.
- Enforced HTTPS termination at the YARP gateway.
Outcome
The legacy monolithic modules were successfully migrated to modern ASP.NET Core running on AKS, improving release frequencies and reducing server infrastructure costs.
Lessons Learned
- 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.
Similar case studies
High-Performance API Gateway for Logistics | ASP.NET Core YARP
Discover how an API Gateway was architected to handle thousands of updates, offline syncing, and real-time alerts for enterprise logistics.
Enterprise Angular Application Modernization | Rajdip Khavad
Learn how an enterprise FinTech application was upgraded from Angular 11 to Angular 17/18, migrating to Standalone Components and Signals.
About Rajdip Khavad
Rajdip Khavad is an Angular and ASP.NET Core/.NET developer specializing in enterprise applications, APIs, application modernization and performance-focused engineering. On this project, his focus was application modernization and monolith decomposition.
