This rule references a rule that no longer exists:
Open in admin panel to fix this issue.
The differences between a web app built with ASP.NET Framework and one built with ASP.NET Core are immense. The entire request pipeline underwent significant changes, and can often be impossible to migrate in-place. So how can you tackle these challenges the right way?
There exists, somewhere, a line that separates the "big bang" and "stranger fig" approach as being the recommended way to tackle web app migrations. While this decision point is unique to every project, you can examine a couple of metrics to help guide your decision.
If your migration plan is solid, you should have a pretty clear idea of the effort involved in migrating your web app. If you're confident that you can get the migration done in a reasonable timeline, and you can implement a feature-freeze during that time, opting for the Big Bang approach may be a reasonable option.
If, however, you know that the migration is going to take a long time, or there are other developers/teams that will be working on other, non-migration work (e.g. feature development), then adopting the Strangler Fig pattern with YARP (Yet Another Reverse Proxy) is often a better choice, and one that we at SSW have had great success with.
The first step is to create a brand new ASP.NET Core web application, where you will be migrating your pages/endpoints into incrementally. For functionalities that have not yet been migrated, YARP will redirect them to the .NET Framework web application.
The best way to do this is via the GitHub Copilot app modernization Visual Studio extension. GitHub Copilot can assist by providing guidance on the necessary configurations for YARP, streamlining the setup process.
YARP configuration determines whether a request should be sent to your new ASP.NET Core web app (for routes that have been migrated) or your old .NET Framework web app (for the routes that have not yet been migrated). This can be either defined in the appsettings.json file, or provided programmatically with InMemoryConfigProvider.
Here's a quick look at a sample YARP route config:
RouteConfig[] GetRoutes(){return[// Route for tokennew RouteConfig(){RouteId = "tokenServePath",ClusterId = tokenClusterId,Match = new RouteMatch{Path = "/token/{**catch-all}",},},// Route for WebUI Appnew RouteConfig(){RouteId = "webUIServePath",ClusterId = webUiClusterId,Match = new RouteMatch{Path = "/api/v2/{**catch-all}",},},// Route for WebApp Appnew RouteConfig(){RouteId = "webAppServePath",ClusterId = webAppClusterId,Match = new RouteMatch{Path = "/api/{**catch-all}",},},// Route for Angularnew RouteConfig(){RouteId = "angularUIServePath",ClusterId = angularClusterId,Match = new RouteMatch{Path = "{**catch-all}",},}];}
Figure: Example code for setting up different paths within YARP's configuration
Once you have created a side-by-side project, you can start migration by interating with GitHub Copilot following these steps:
Copilot will then run a three-stage workflow, namely the assessment stage, the planning stage and the execution stage. You can find detailed description here.
When a web project is heavily reliant on .NET Framework dependencies, the first step in gauging the effort required for a complete migration is to thoroughly examine these dependencies. This involves a detailed investigation, followed by the creation of PBIs for each dependency. These PBIs serve to accurately scope out the total effort that will be needed for the migration process.
Listed below are rules crafted to aid in the project migration process. Please ensure to incorporate only those rules that are applicable to your specific project.