3 ms·
> you can't run webforms + MVC Core side-by-side Besides the obvious IFRAME approach, one could have a single solution with both a ASP.NET Web Application proj
by mycall 4y ago
> you can't run webforms + MVC Core side-by-side
Besides the obvious IFRAME approach, one could have a single solution with both a ASP.NET Web Application project and another MVC (or Blazor) project. Both of them would reference shared models/services via some .NET Standard 2.0 project. IIS can host ASP.NET Core.
Then start refactoring and rewrite the old HTML4/CSS2 into HTML5/CSS4, while the Server Controls and Master Pages become Razor Components.
There is definitely an upgrade path.
- jiggawatts 4y agoThat generally requires a reverse proxy or content-switch. That reverse proxy will then have to lie to one or both apps about their URLs, etc... Microsoft is recommending YARP for this: https://learn.microsoft.com/en-us/events/dotnetconf-2022/migrate-your-legacy-aspnet-projects-to-aspnet-core-incrementally-with-yarp https://learn.microsoft.com/en-us/events/dotnetconf-2022/mig... That sounds okay, but you'll hit all sorts of fun technical challenges. Good look making WCF client certificate authentication work through this! There are also performance gotchas with buffering, etc... There are not-atypical scenarios where during a migration, an app might be behind 4+ reverse proxies, all of which are different products. E.g.: CDN -> App Gateway WAF v2 -> Kubernetes Ingress -> YARP -> Legacy App. You'll quickly discover all sorts of fun interactions between these and 15-year-old ASP.NET code!