Insights & Blog

ASP.NET Web Forms to ASP.NET Core or Blazor: Choosing the Right Migration Path

Web Forms can't move to .NET 10 as-is. Blazor, Razor Pages, MVC or an API? A module-by-module decision guide with control mapping and code.

By Hetal KSoftware Architecture, .NET & APIs

A Web Forms order search page with GridView and ViewState flowing into four ASP.NET Core targets on .NET 10: Blazor, Razor Pages, MVC and API plus SPA, with a QuickGrid code sample

ASP.NET Web Forms does not run on ASP.NET Core, so every Web Forms to Blazor or ASP.NET Core migration rebuilds the user interface while keeping as much business logic as possible. The right target depends on how each part of the application behaves: Blazor fits stateful, control-heavy screens; Razor Pages fits form-and-list pages; MVC fits large, route-heavy applications; and an API plus a JavaScript front end fits products that need a separate client. Most enterprise portfolios end up with a mix, migrated incrementally behind one URL.

Technically reviewed by Harshita Pipaliya.

This is the fourth article in our Legacy Modernization Series. It focuses on choosing the target, with a scoring matrix, control mapping and code patterns. For the delivery process (inventory, regression testing and cutover), see our companion guide to modernizing a legacy ASP.NET Web Forms application.

Executive summary

  • Web Forms stays on .NET Framework. It is part of ASP.NET on .NET Framework and is not available on ASP.NET Core. Microsoft’s Blazor guide for Web Forms developers says “ASP.NET Web Forms will continue to be supported for many years” and that migration “is a time-consuming task that requires planning” (Microsoft Learn). .NET Framework 4.8.1 has no announced end date; it follows the Windows lifecycle.
  • There is now a Microsoft tool path. Microsoft’s GitHub Copilot app modernization documentation lists a “WebForms-to-Blazor upgrade” scenario that “Upgrades ASP.NET Web Forms applications to Blazor Server” (Microsoft Learn). Treat its output as a draft that needs review and tests; Microsoft’s own FAQ says suggestions “aren’t guaranteed to follow best practices.”
  • Target platform: ASP.NET Core on .NET 10 (LTS, supported to November 14, 2028) (.NET support policy).
  • Our recommendation: decide per module, not per application. Default to Blazor (static server rendering plus interactive server components where needed) for internal line-of-business screens, and Razor Pages for public, SEO-sensitive or simple form pages. Migrate incrementally with YARP and the System.Web adapters so users keep one site and one login.

Where Web Forms stands in 2026

ItemStatusImplication
Web Forms on .NET Framework 4.8.1Supported as part of .NET Framework; no announced end dateNo forced deadline, but no new investment
Web Forms on ASP.NET Core / .NET 10Not availableUI must be rebuilt
.NET Framework 4.6.2Support ends January 12, 2027Retarget to 4.8.1 now if you are staying for a while
BlazorActively developed in each .NET releaseMain Microsoft-recommended path for Web Forms developers
Copilot app modernizationLists Web Forms as a supported project type and a Web Forms-to-Blazor Server scenarioSpeeds up conversion; does not remove design and testing work

What we can say and what we can’t. Microsoft has not announced an end of support date for Web Forms. The business case for migrating is about talent, security, cloud hosting and feature velocity, not a published deadline. Anyone who tells you Web Forms “stops working” on a given date is not quoting Microsoft.

Why Web Forms applications are hard to move

  • The page lifecycle hides behaviour. Page_Load, postbacks, IsPostBack checks and event ordering carry business rules that are not visible in any one method.
  • ViewState and control state. Pages rely on state round-tripped in hidden fields. Modern targets need explicit state ownership.
  • Server controls and third-party suites. GridView, FormView, UpdatePanel and vendor grids, charts and report viewers have no drop-in equivalents.
  • System.Web coupling. HttpContext.Current, Session, Cache and membership APIs often leak into business libraries.
  • Master pages, user controls and themes that encode layout and authorization.

Our earlier article on upgrading VB.NET applications to .NET 10 covers the library side; this article focuses on the UI decision.

The four target options

TargetWhat it isClosest to Web Forms inBiggest change
BlazorComponent model in C# and Razor; static or interactive renderingComponents, events, data binding, code-behind styleComponent lifecycle and render modes
Razor PagesPage-focused, request/response model with a handler class per pageOne .aspx page becomes one .cshtml pageNo postback events or ViewState
ASP.NET Core MVCControllers, views and modelsLarge apps with many shared actionsRouting and separation of concerns
Web API + SPAASP.NET Core API with a React or Angular front endLittle; a new client architectureTwo codebases and JavaScript skills

Decision matrix: Blazor vs Razor Pages vs MVC vs API + SPA

Score each module, not the whole application. Our recommended weighting is shown; adjust it to your priorities.

Factor (weight)BlazorRazor PagesMVCAPI + SPA
Rich, stateful screens: grids, wizards, live updates (25%)●●●●●●●●●●●●
Familiarity for a C# Web Forms team (20%)●●●●●●●●●●●
Public SEO and fast first load (15%)●●● (static SSR)●●●●●●●●●●
Reuse of existing C# logic (15%)●●●●●●●●●●●●●●● (in the API)
Third-party component availability (10%)●●●●●●●●●●●●●
Separate mobile or partner consumers (10%)●●●●●●●●●
Long-term skills market (5%)●●●●●●●●●●●●●

●●●● = strong fit, ● = weak fit. This is our judgment from delivery experience, not a published benchmark.

How we read the matrix in practice:

  • Internal line-of-business apps with GridView-heavy screens: Blazor.
  • Public or SEO-sensitive pages (catalogue, content, simple forms): Razor Pages, or Blazor static server rendering.
  • Large applications with many reusable actions and strict layering: MVC.
  • Products that need a separate mobile or partner client: Web API first, with Blazor or a JavaScript front end on top.
  • Mixed portfolios: combine them. Razor Pages and Blazor components can live in the same ASP.NET Core app.

Choosing a Blazor render mode

Since .NET 8, Blazor Web Apps choose a render mode per page or component (Microsoft Learn: render modes).

Render modeHow it runsGood forWatch out for
Static server (SSR)HTML rendered on the server, no persistent connectionRead-mostly pages, public pages, formsNo interactive events without enhancement
Interactive ServerComponents run on the server over a SignalR circuitInternal apps, data-heavy grids; closest to Web FormsNeeds a stable connection; server memory per user
Interactive WebAssemblyComponents run in the browser on .NET WebAssemblyOffline-tolerant or client-heavy UILarger download; all data via APIs
Interactive AutoServer first, then WebAssembly after downloadPublic apps needing interactivityTwo hosting models to test

Our default for Web Forms migrations: static SSR for most pages, Interactive Server for the complex screens, and WebAssembly only where there is a clear need.

Control and concept mapping

Web FormsBlazorRazor Pages / MVC
.aspx page + code-behind.razor component with @code or partial class.cshtml + PageModel or controller
Master pageLayout component (MainLayout.razor)_Layout.cshtml
User control (.ascx)Child componentPartial view or view component
Page_Load, IsPostBackOnInitializedAsync, OnParametersSetAsyncOnGet / OnPost handlers
Button click event@onclick handlerForm POST to a named handler
ViewStateComponent fields (Interactive) or explicit form stateHidden fields, TempData or database
GridView / ListViewQuickGrid (Microsoft Learn) or a vendor gridTable markup, paging via query string
ValidatorsEditForm + DataAnnotationsTag helpers + DataAnnotations
UpdatePanelInteractive components (built in)Fetch or HTMX-style partial updates
Session, CacheScoped services, distributed cacheISession, IDistributedCache
Forms or Windows authenticationASP.NET Core Identity, Entra ID (OpenID Connect), NegotiateSame
web.config app settingsappsettings.json, environment variables, Key VaultSame

Code translation patterns

The examples below are illustrative and simplified.

Web Forms page with a GridView and a button:

<%@ Page Language="C#" CodeBehind="Orders.aspx.cs" Inherits="Shop.Orders" %>
<asp:TextBox ID="txtCustomer" runat="server" />
<asp:Button ID="btnSearch" runat="server" Text="Search" OnClick="btnSearch_Click" />
<asp:GridView ID="gvOrders" runat="server" AutoGenerateColumns="false" AllowPaging="true">
  <Columns>
    <asp:BoundField DataField="Number" HeaderText="Order" />
    <asp:BoundField DataField="Total" HeaderText="Total" DataFormatString="{0:C}" />
  </Columns>
</asp:GridView>
// Orders.aspx.cs
protected void btnSearch_Click(object sender, EventArgs e)
{
    gvOrders.DataSource = OrderData.Search(txtCustomer.Text); // static helper using HttpContext.Current
    gvOrders.DataBind();
}

Blazor component on .NET 10 (Interactive Server):

@page "/orders"
@rendermode InteractiveServer
@inject IOrderService Orders

<input @bind="customer" placeholder="Customer" />
<button @onclick="SearchAsync">Search</button>

<QuickGrid Items="results" Pagination="pagination">
    <PropertyColumn Property="o => o.Number" Title="Order" Sortable="true" />
    <PropertyColumn Property="o => o.Total" Title="Total" Format="C" />
</QuickGrid>
<Paginator State="pagination" />

@code {
    private string customer = "";
    private IQueryable<OrderRow>? results;
    private readonly PaginationState pagination = new() { ItemsPerPage = 20 };

    private async Task SearchAsync() =>
        results = (await Orders.SearchAsync(customer)).AsQueryable();
}

Razor Pages equivalent (no persistent connection, SEO-friendly):

// Pages/Orders.cshtml.cs
public sealed class OrdersModel(IOrderService orders) : PageModel
{
    [BindProperty(SupportsGet = true)] public string? Customer { get; set; }
    public IReadOnlyList<OrderRow> Results { get; private set; } = [];

    public async Task OnGetAsync() =>
        Results = string.IsNullOrWhiteSpace(Customer) ? [] : await orders.SearchAsync(Customer);
}

The shared service is the part you keep. Move logic out of code-behind into an IOrderService that has no System.Web dependency. It can be multi-targeted (net481;net10.0) and used by the old Web Forms pages and the new UI during the transition.

public interface IOrderService
{
    Task<IReadOnlyList<OrderRow>> SearchAsync(string customer, CancellationToken ct = default);
}

Incremental migration architecture

Microsoft’s incremental migration guidance puts a new ASP.NET Core app in front of the existing ASP.NET Framework app, uses YARP to forward unmigrated routes, and uses the System.Web adapters to share session and authentication between the two (Microsoft Learn: incremental migration).

Incremental Web Forms migration: users reach an ASP.NET Core front door on .NET 10 with YARP; migrated modules run as Blazor components and Razor Pages; unmigrated .aspx pages are forwarded to the Web Forms app on .NET Framework 4.8.1; session and authentication are shared through the System.Web adapters; both use shared class libraries and the same database
  1. Front door: ASP.NET Core on .NET 10 owns the hostname. Migrated routes are served locally; YARP forwards the rest to Web Forms.
  2. Shared state: System.Web adapters remote app session and remote authentication let the new app read the legacy session and sign-in while both run.
  3. Shared libraries: business logic extracted from code-behind, targeting .NET Standard 2.0 or multi-targeted, used by both apps.
  4. Data: the existing database stays the system of record during coexistence.
  5. Identity end state: move to Microsoft Entra ID or ASP.NET Core Identity; see our guide to secure authentication with ASP.NET Core and Entra ID.

Unsure which target fits each module? Book a Web Forms migration assessment and we will score your screens against this matrix.

Tooling, including AI-assisted upgrades

ToolUse it forLimits
GitHub Copilot app modernizationAssessment; Web Forms-to-Blazor Server scenario; ASP.NET (MVC, Web API) to ASP.NET CoreNeeds a local Git repository; migrations from .NET Framework require Windows; output needs review (FAQ)
System.Web adaptersRunning .NET Framework and ASP.NET Core side by side, sharing session and authTransitional; plan to remove them
YARPRouting traffic between old and new appsAdds a network hop
Community Web Forms component libraries for BlazorFaster first conversion by mimicking asp: controlsCan carry Web Forms patterns into the new code; review before adopting
Vendor UI suitesReplacing commercial grids, charts and report viewersLicensing and different APIs

We treat AI-generated conversions as a fast first draft: they reduce typing, not the need for architecture decisions, test coverage and code review. For AI-assisted workflows, see OpenAI Codex for legacy .NET modernization.

Step-by-step roadmap

  1. Assess (2 to 4 weeks): inventory pages, user controls, third-party controls, System.Web usage in libraries, session keys and authentication. Score each module with the decision matrix.
  2. Stabilise: retarget to .NET Framework 4.8.1; move logic out of code-behind into services; add characterization tests.
  3. Stand up the front door: ASP.NET Core on .NET 10 with YARP, System.Web adapters, CI/CD and telemetry. Go live with zero migrated pages.
  4. Migrate module by module: start with a valuable but bounded module. Build in the chosen target, test, then route its URLs to the new app.
  5. Replace platform features: authentication, file handling, reporting, email and scheduled jobs.
  6. Decommission: when proxy traffic to Web Forms reaches zero, remove YARP routes, adapters and the old app.

For regression testing and cutover detail, see our Web Forms modernization guide.

Security, performance and hosting

  • Security: ASP.NET Core adds anti-forgery, output encoding and Data Protection by default. Replace Forms authentication and the membership provider with Entra ID or ASP.NET Core Identity, and move secrets to Azure Key Vault.
  • Blazor Server capacity: each interactive user holds a circuit in server memory. Load test with realistic concurrency and configure Azure SignalR Service or sticky sessions when scaling out.
  • Hosting: IIS with the ASP.NET Core Module, Azure App Service or containers. Linux hosting is possible once Windows-only dependencies are gone.
  • Performance: measure first-load and interaction latency for your actual users; static SSR pages are usually lightest.

Cost, effort and timeline

The ranges below are indicative planning assumptions, not benchmarks or quotes.

Application profileTypical scopeIndicative cost (USD)Indicative duration
SmallUnder 40 pages, few third-party controls$30,000 to $100,0002 to 4 months
Medium40 to 200 pages, vendor grids, reports, Forms auth$100,000 to $400,0004 to 10 months
Large200+ pages or several apps, complex workflows and integrations$400,000 to $1.5M+10 to 24 months

The biggest cost drivers are third-party controls, logic in code-behind, session coupling and the absence of tests. For budgeting, see legacy application modernization cost and ROI.

FAQs

Can Web Forms run on .NET 10?

No. Web Forms is part of ASP.NET on .NET Framework and is not available on ASP.NET Core. The user interface has to be rebuilt; business libraries can often be reused after removing System.Web dependencies.

Is Blazor the official replacement for Web Forms?

Microsoft publishes a Blazor guide for Web Forms developers, and its Copilot app modernization tooling includes a Web Forms-to-Blazor Server scenario. Razor Pages and MVC remain fully supported alternatives.

Is Web Forms still supported?

Yes, as part of .NET Framework 4.8.1, which has no announced end date. Microsoft says Web Forms “will continue to be supported for many years”, but it receives no new features.

Should we choose Blazor Server or Blazor WebAssembly?

For most migrated internal apps, start with static server rendering plus Interactive Server components. Use WebAssembly only when you need client-side execution or reduced server load per user.

Can GitHub Copilot convert Web Forms to Blazor automatically?

It can generate a first conversion of pages, controls and code-behind into Blazor components. Plan for review, refactoring and testing; Microsoft states its suggestions are not guaranteed to follow best practices.

Can Web Forms and Blazor run side by side?

Yes. Use an ASP.NET Core front door with YARP and the System.Web adapters to share session and authentication while modules move.

Should we migrate to MVC 5 first?

No. MVC 5 is also on .NET Framework. Go directly to ASP.NET Core on .NET 10.

Conclusion

A Web Forms to Blazor or ASP.NET Core migration is a series of decisions, not a single conversion. Score each module, use Blazor where Web Forms-style interactivity matters, Razor Pages where simplicity and SEO matter, and an API where other clients need the same logic. Move incrementally behind one front door, keep business logic in shared services, and use AI tooling to speed up conversion without skipping tests.

Previous in this series: Classic ASP to ASP.NET Core. Next: ASP.NET MVC 5 to ASP.NET Core MVC: A Practical Enterprise Upgrade Guide.

Related services: Legacy Software Modernization · .NET Development · Web Development · Microsoft Azure · Hire .NET Core Developers

Sources

Plan your Web Forms migration

Prominent.tech helps teams score each Web Forms module, choose between Blazor, Razor Pages, MVC and an API-first design, and migrate incrementally to ASP.NET Core on .NET 10 with one site and one login throughout. Talk to our modernization team or explore our legacy software modernization services.

From insight to implementation

Turn these ideas into a practical plan

Discuss how the ideas in this article apply to your business, systems and data. We’ll help you identify a focused first step.