Rewriting vs. Migrating a WebForms Application to .NET 8
April 21, 2026
WebForms doesn't run on .NET Core or .NET 8, and Microsoft isn't going to change that. If your application has to move, you have two options: rewrite it, or port the business logic to modern .NET and rebuild the UI on top of it.
Which one makes sense depends on how tangled the business logic is with the WebForms pages. You can't tell that from outside the code. That's why estimates made without reading it are wrong, sometimes too high and sometimes too low.
What migration means here
Migration means pulling out the business logic and data access, porting them to .NET 8, and building a new front end in ASP.NET Core MVC, Razor Pages or Blazor.
Everything WebForms-specific goes: .aspx markup, code-behind, server controls, ViewState and postbacks. None of it has a direct equivalent. What you keep is the logic underneath, and when it's cleanly separated, porting it costs far less than writing it again.
When the logic lives in code-behind and calls WebForms APIs, migration and rewrite come out to about the same amount of work. You can call it either one and the bill won't change.
How to tell how tangled it is
Signs the logic will come out cleanly:
- Business rules sit in separate class library projects with no
System.Webreference - Data access has its own layer, outside the pages
- Code-behind files are short and mostly wire up controls
- Domain classes don't know anything about the UI
Signs it won't:
- Business rules written directly in
Page_Loadand event handlers - ViewState or
Sessionholding business data, not just UI state - Database calls made straight from code-behind
- Domain logic that reads or sets control properties
- Validation that exists only in WebForms validator controls
- Business decisions that branch on
IsPostBack
Count the business rules in each list. The ratio is your estimate.
When migration is the better call
The business logic is already separate. Class libraries with domain models, services and data access usually port without much trouble. The project becomes building a new web layer over logic that already works, and you can test it at each step.
The application is large and the rules are complicated. A rewrite means rebuilding years of behavior from documentation, what users remember and watching the old system run. Edge cases that took years to show up in production have to be found all over again. Porting logic that has already run in production for years is much less risky.
You need to ship in stages. You can put a routing layer in front and move the busiest or most actively changed pages first, leaving the rest on the old application for now. Both applications have to run side by side with shared login. That's solvable, but someone has to design it up front. A rewrite usually goes live all at once.
When a rewrite is the better call
The logic can't be separated from the pages. If pulling it out means rewriting it anyway, migration buys you nothing. You may as well write it clean against today's requirements.
The old design is the problem. Migration keeps the data model and the architecture. If the schema no longer fits the business, or the architecture blocks something you need to build, a rewrite is how you change them. Trying to change them in the middle of a migration costs more than doing it on purpose.
The requirements have moved on. A different user model, data structure or set of integrations means the old code solved a different problem. Port it and you'll spend the next year reworking it.
Read the code before you decide
Spend one to two weeks reviewing the code before you choose. It's the cheapest part of either path, and it should tell you:
- How much logic can be extracted, as a share of business rules in separate code versus code-behind
- Dependencies. Packages with no modern version,
System.Webusage,System.Drawing, COM interop and any WCF hosting - Data access, and whether it ports as is
- Test coverage, which decides how you'll prove the new version behaves like the old one
- Authentication, which is often the most tangled piece and the one people underestimate
- An estimate for each path, built from the findings above, not from a template
If you commit to a migration without reading the code, you'll underestimate how tangled it is. If you commit to a rewrite without reading it, you'll underestimate how much undocumented production behavior the old system handles. Two weeks of reading the code prevents both.
Working through a problem like this?
Describe the system and where it's stuck. I'll tell you what the work actually involves.
Get in touch