Fast. Simple. No meetings. No delays.
Home / Blog / ASP.NET / Migrating ASP.NET Web Forms to ASP.NET Core: A Realistic Plan

Migrating ASP.NET Web Forms to ASP.NET Core: A Realistic Plan

Why Web Forms migrations are rarely a port, and a staged approach — assess, isolate, rebuild by slice — that keeps the business running.

Cover graphic for the article: Migrating ASP.NET Web Forms to ASP.NET Core: A Realistic Plan

To migrate Web Forms to ASP.NET Core you have to rebuild rather than port, because Core has no Web Forms runtime, no server controls and no ViewState. The safest route is staged: inventory what exists, put a routing layer in front, then replace the application one slice at a time while the old system keeps serving users.

What you are really migrating

Teams often start by searching for a converter, and that is where plans go wrong. Web Forms is a page-and-control model with an event lifecycle, server-side state and markup generated by controls. ASP.NET Core is built on a different model: requests flow through middleware to controllers, Razor Pages, minimal endpoints or Blazor components. There is no one-to-one mapping for a GridView, an UpdatePanel or a Page_Load that quietly depends on ViewState.

So the real work is not translating files. You are extracting business rules from code-behind, deciding what the new user interface should look like, and moving the application from the older .NET Framework to modern .NET. Treat it as a re-implementation of known behaviour, with the old system acting as your living specification.

That framing also helps with stakeholders. Instead of promising a like-for-like copy, you promise that specific workflows will behave the same, and you agree up front which screens may change.

Assess pages, controls and dependencies

Before choosing a target, build an inventory. A spreadsheet is enough. For each page or user flow, record:

  • Traffic and business value: pages nobody opens may not need migrating at all.
  • Control usage: third-party control suites, data grids, report viewers and custom user controls are the expensive items.
  • Data access style: datasets, ADO.NET in code-behind, Entity Framework, stored procedures.
  • Hidden dependencies: Windows-only libraries, COM components, GAC assemblies, WCF services, scheduled jobs and file-share paths.
  • State: session variables, application variables, ViewState, hidden fields.
  • Test coverage: most Web Forms applications have little, which shapes how you verify the result.

Group the result into three buckets: rebuild, retire and keep as-is for now. The retire bucket is usually larger than owners expect. Microsoft publishes migration guidance and analysis tooling for moving from .NET Framework; check their current documentation for what the tools cover, and treat any automated report as a starting point rather than an estimate.

The strangler approach to migrate Web Forms to ASP.NET Core

A big-bang rewrite means months of work with nothing shipped and a risky switch at the end. The alternative is the strangler pattern: a new ASP.NET Core application sits in front of the old one, handles the routes it owns, and forwards everything else to the Web Forms application. Over time the old application handles fewer routes until it can be switched off.

Practically, this usually means a reverse proxy layer (a gateway, a proxy library inside the Core app, or your load balancer) with a routing table you control. Microsoft has also documented incremental-migration helpers for sharing things like session and authentication between the two applications; confirm what is current before you commit to a design. The point is that the two systems coexist, and yes, Web Forms keeps running on .NET Framework and IIS alongside the new app, because they are separate processes.

Things to settle early: one public hostname, how URLs map to old versus new, how cookies and sessions are shared, and where the shared database lives. If you are weighing a wider platform change at the same time, our comparison of ASP.NET Core and Laravel covers the stack decision separately.

Rebuilding UI by slice

Choose slices that are small, valuable and fairly self-contained: a login and profile area, a reporting page, a single order workflow. A good first slice is low-risk but real, because it proves the routing, authentication and deployment pipeline end to end.

For the new interface you have several options:

  • Razor Pages or MVC: server-rendered, familiar to teams used to page-per-URL thinking, and simple to test.
  • Blazor: a component model that some Web Forms developers find natural, with trade-offs around hosting model and interactivity that deserve a short proof of concept.
  • A JavaScript front end over an API: sensible if you also want a mobile client or a public API, but it is a larger change than the migration itself.

Whatever you choose, extract business logic out of code-behind into plain classes first. That logic is the part you are keeping, and once it is separated from the page it can be unit tested and reused by both old and new applications during the transition.

Data access and sessions

Leave the database alone for as long as you can. Both applications reading and writing the same schema is what makes slice-by-slice migration possible. Schema redesign belongs in a later phase, after the old system is gone.

On the data layer, replace datasets and inline ADO.NET gradually with a data access approach your team can maintain, such as Entity Framework Core or a lightweight mapper. Be careful with behaviour differences: query translation, transaction handling and default connection settings are not identical across the older and newer data libraries, so write a few characterisation tests around critical queries.

ViewState deserves its own note. There is no equivalent in Core. Anything stored in ViewState must become an explicit choice: a hidden form field, a database row, a server-side cache entry or a client-side value. Session state also needs thought. If both applications must read the same session during the transition, plan a shared store rather than assuming in-process sessions will line up. Better still, design the slices so they do not need to share session data at all.

Authentication and authorisation

Older Web Forms sites often use forms authentication, membership providers or Windows authentication. These do not carry across unchanged. Decide whether the new application will use ASP.NET Core Identity, an external identity provider, or a shared cookie arrangement with the old site during the transition.

Key checks: password hash compatibility (so users are not forced to reset everything), role and permission mapping, single sign-out behaviour, and any page-level authorisation rules buried in web.config location blocks. Write those rules down as a table before you rebuild them, because they are easy to miss and costly when wrong. For security expectations in general, see the OWASP-based security checklist; the principles apply on any stack.

Cut-over and testing

Since you cut over route by route, each slice has its own mini release. A reliable routine looks like this:

  1. Capture the old behaviour with sample inputs and outputs, including awkward edge cases from real support tickets.
  2. Build the slice and compare results side by side, ideally with real (anonymised) data.
  3. Release behind a routing switch so you can send a small group of users, or only internal staff, to the new version first.
  4. Keep the old route available for rollback until the slice has run through a full business cycle, such as a month-end.
  5. Remove the old page only after you have confirmed nothing links to it, including emails, bookmarks and partner integrations.

Finally, schedule decommissioning. Many migrations stall at the last stretch because the old application still serves a few rarely used pages. Put the leftovers on a visible list with an owner.

Putting it together

A realistic plan is: inventory and triage, set up the routing layer, ship one small slice, then repeat in order of business value. How long the whole thing takes depends on the number of pages, the control libraries involved, test coverage and how much the interface may change, so be wary of anyone quoting a duration before seeing the code. If you are deciding whether to modernise at all, the article on when to replace legacy software is a useful companion, and our US software development page outlines how a remote engagement can be set up. Always check Microsoft's current migration documentation before locking in tooling choices.

Frequently asked questions

Can Web Forms run alongside Core?

Yes. Web Forms runs on .NET Framework under IIS, while an ASP.NET Core app is a separate process, so both can serve the same site. A reverse proxy or gateway routes each URL to the old or new application. You must plan shared authentication and session handling, and check Microsoft's current guidance on incremental migration.

What happens to ViewState?

ViewState does not exist in ASP.NET Core. Each piece of data it held must become an explicit choice: a hidden field, a database record, a server-side cache entry or a client-side value. Audit pages that rely on it early, because hidden ViewState dependencies are a common source of surprises during a rebuild.

How long does a migration take?

It depends on the number of pages, the control libraries in use, test coverage, data access style and how much the interface may change. A staged approach lets you ship value early and measure your own pace after the first slice. Treat any duration quoted before a code review with caution.

Related articles

🚀 Start Now