Skip to main content
Nicolas Cousin Tech Solutions

Migrating an ASP.NET MVC 5 application to .NET 10: where to start without rewriting everything?

By Nicolas Cousin · published on 1 December 2026

You can't move an ASP.NET MVC 5 application to .NET 10 by changing its target framework: it has to be rebuilt on ASP.NET Core. For a large application in production, Microsoft favors an incremental migration, with an ASP.NET Core app placed in front of the old one. The costliest pitfalls are in authentication and session.

In short. An ASP.NET MVC 5 application can't simply be upgraded to .NET 10. It is built on System.Web, which doesn't exist on modern .NET, so it has to be rebuilt on ASP.NET Core. For a large application that must stay in production, Microsoft favors an incremental migration: an ASP.NET Core app receives every request, handles the routes already migrated, and forwards the rest to the old application.

Checked on November 11, 2026 against Microsoft Learn, NuGet and Microsoft's GitHub repositories, linked in the text.


Why doesn't MVC 5 migrate like a .NET 8 project?

Going from .NET 8 to .NET 10 is mostly a matter of changing the target framework and updating packages, as I explained in the article on .NET 8 end of support. An MVC 5 application runs on .NET Framework and depends on System.Web: IIS hosting, the request lifecycle, Global.asax, HTTP modules and HttpContext.Current. None of that exists in ASP.NET Core. Business code can often be reused; the web layer has to be redone.

There is no deadline either. According to the .NET Framework lifecycle FAQ, support for .NET Framework 4.8 and 4.8.1 follows the lifecycle of the Windows version it is installed on, and no end date has been announced. Microsoft's page on .NET Framework versions goes further: .NET Framework will keep shipping with Windows and existing apps don't need to be migrated, though new development should use .NET.

Two exceptions are worth checking in your project files. .NET Framework 4.6.1 and earlier have been out of support since April 26, 2022. .NET Framework 4.6.2 support ends on January 12, 2027, according to the .NET Framework installation page.

With no forced deadline, the decision comes down to what standing still costs you:

  • .NET Framework only installs on Windows, which rules out Linux containers and Linux hosting;
  • current versions of EF Core and ASP.NET Core stay out of reach.

If your application is stable, rarely changed and hosted on a supported Windows Server, staying on .NET Framework 4.8 is a defensible choice.

In-place or incremental migration?

Microsoft's guide to migrating from ASP.NET Framework to ASP.NET Core offers two paths:

  • migrating the whole project in place, recommended for small to medium applications with few dependencies;
  • incremental migration, which Microsoft presents as an implementation of the Strangler Fig pattern, suited to large projects or projects that must stay in production.

Strangler Fig: where does the name come from? A strangler fig germinates in a nook of a tree, feeds on it until it roots in the ground, and can then outlive its host while keeping its shape. Martin Fowler, who coined the term, borrowed the image to describe gradual modernization. New code is built alongside the old system and takes over its behavior piece by piece, until the old system can be retired. Fowler calls the code that lets both coexist “transitional architecture”: it goes away at the end. Here, the ASP.NET Core app plays the fig, and the YARP proxy and the System.Web adapters are the transitional architecture.

Definition: Martin Fowler, “Strangler Fig”, martinfowler.com, version of August 22, 2024.

As for a full rewrite, Microsoft considers it difficult and risky for most production applications.

The choice between the two paths depends on four things: the size of the application, the authentication mode and how much it relies on session, test coverage of the critical paths, and whether you need to ship features during the migration.

An in-place migration ships in one go: the new version only reaches production once everything is ported, and any fixes made to the old code in the meantime must be carried over. An incremental migration lets you ship route by route, at the cost of a coexistence setup you have to run for the whole transition.

What should you prepare before touching the web layer?

In its guide “Get started with incremental migration”, Microsoft starts by creating the ASP.NET Core project that acts as the proxy, then has you address technical debt, and only migrates libraries when the routes being moved need them. I add two steps to do before the first route is migrated: moving to .NET Framework 4.8 and testing the critical paths.

Move to .NET Framework 4.8

If the application targets 4.6.2 or earlier, this is the first and cheapest step: it puts the app back on a supported version with no announced end date. Aim for 4.8.1, or 4.8 on Windows Server 2016 and 2019, where 4.8.1 doesn't install.

Modernize the project files

Microsoft suggests considering a move from packages.config to PackageReference, then to SDK-style project files. Visual Studio's migration tool doesn't support ASP.NET projects: it works on class libraries, and the web project has to be converted by hand or with the GitHub Copilot agent covered below, which advertises this conversion. Its documentation doesn't say whether it handles a System.Web web project. The community SDK MSBuild.SDK.SystemWeb, not published by Microsoft, covers that case.

Move business logic into shared libraries

A library targeting netstandard2.0 can be used from both .NET Framework and .NET 10. Microsoft's cross-platform targeting guidance states that .NET Standard 2.0 works from .NET Framework 4.6.1, with some issues fixed in 4.7.2. When netstandard2.0 isn't enough, a library can target both net48 and net10.0. Microsoft advises migrating libraries starting from the leaves of the dependency graph, with the web application last.

Reduce reliance on HttpContext.Current

A library that reads HttpContext.Current can't be shared as is. You can pass the values it needs as parameters, or replace the System.Web reference with the Microsoft.AspNetCore.SystemWebAdapters package, which provides the common System.Web APIs to both applications.

Keep Entity Framework 6

EF6 runs on modern .NET. Version 6.5.2, released in April 2026, explicitly fixes compatibility with .NET 10, according to what's new in EF6. Microsoft's EF Core porting guide confirms it: you can migrate to .NET first while keeping EF6, then move to EF Core later. The EDMX model designer, however, works neither on .NET projects nor on SDK-style projects.

Test the critical paths

Sign-in, access rights, payment and exports are the paths most exposed during the switch. HTTP integration tests written against the old application should pass the same way against the new one.

How do you run both applications side by side?

The “Remote app setup” page describes the setup:

  1. a new ASP.NET Core app on .NET 10 receives every request;
  2. it handles the routes already migrated itself;
  3. a fallback route forwards everything else to the MVC 5 application through YARP, the reverse proxy maintained by Microsoft.

On the ASP.NET Core side, once the Yarp.ReverseProxy and Microsoft.AspNetCore.SystemWebAdapters.CoreServices packages are installed, the configuration fits in a few lines of Program.cs:

using Microsoft.AspNetCore.SystemWebAdapters;
using Microsoft.Extensions.Options;

var builder = WebApplication.CreateBuilder(args);

builder.Services.AddSystemWebAdapters()
    .AddRemoteAppClient(options =>
    {
        options.RemoteAppUrl = new(builder.Configuration["RemoteAppUri"]);
        options.ApiKey = builder.Configuration["RemoteAppApiKey"];
    });

builder.Services.AddReverseProxy();

var app = builder.Build();

// Authentication, routing and already-migrated controllers go here.

// Anything that didn't match a route goes to the MVC 5 application.
app.MapForwarder("/{**catch-all}",
        app.Services.GetRequiredService<IOptions<RemoteAppClientOptions>>()
            .Value.RemoteAppUrl.OriginalString)
    .WithOrder(int.MaxValue)
    .ShortCircuit();

app.Run();

Assembled from the snippets on the Microsoft page linked above, shown for illustration and not compiled for this article. The MVC 5 application changes little: it installs Microsoft.AspNetCore.SystemWebAdapters.FrameworkServices, registers the remote app server in Application_Start with the same API key, and adds the SystemWebAdapterModule module to its web.config.

The System.Web adapters handle what the two applications share:

  • session, which the Core app reads and writes in the MVC 5 app;
  • authentication, which the MVC 5 app can keep handling for both;
  • System.Web APIs in shared libraries.

Version 2.3.0, published on NuGet on February 10, 2026, targets .NET 10 among others. The Learn documentation is behind on this and still says “.NET 5+”: for supported versions, trust the NuGet page. If you use Aspire, a dedicated integration (Aspire.Hosting.IncrementalMigration) exists, still in preview.

For migration order, start with simple, low-risk routes: read-only pages, internal APIs, rarely used admin screens. Authentication, payment and anything touching permissions come last, once the first routes have run in production without incident.

What actually changes in the code?

ASP.NET MVC 5ASP.NET Core (.NET 10)
Global.asaxProgram.cs, which handles startup
Web.configappsettings.json, IConfiguration and the Options pattern
HTTP modules and handlersMiddleware, where execution order matters
Child actions (Html.Action)View components
Web API 2 (ApiController, IHttpActionResult)A single controller model: ControllerBase, ActionResult<T>
Bundling and minification (System.Web.Optimization)No built-in tool; Microsoft mentions third-party tools such as Gulp or Webpack
Third-party container via DependencyResolver (Ninject, Unity…)Built-in dependency injection

Sources: Microsoft's pages on migrating HTTP modules, Web API and bundling.

Controllers and Razor views keep their structure, but nearly all of them need edits. The namespace moves from System.Web.Mvc to Microsoft.AspNetCore.Mvc, and return types, HTML helpers, filters and model binding change too. This work can be split route by route.

Which pitfalls should you expect?

Authentication cookies

If the MVC 5 application uses OWIN cookie authentication, Microsoft documents how to make it issue cookies that ASP.NET Core can read. You need the Microsoft.Owin.Security.Interop package, a shared Data Protection key ring, the same application name and the same cookie name. Microsoft then recommends that users sign in through only one of the two apps.

For Forms Authentication or custom authentication, Microsoft points to remote authentication, described on the page about migrating authentication. Sign-in and sign-out then stay in the old app, and each authenticated request costs an extra HTTP call. This mechanism doesn't support Windows authentication, which Microsoft advises configuring directly in the ASP.NET Core app.

Password hashing

ASP.NET Core Identity can verify hashes produced by ASP.NET Identity 1 and 2: it picks the algorithm from the hash's first byte, according to the Identity configuration docs. New passwords, however, are hashed in the v3 format. I infer that if both apps share the user database during coexistence, the old app can't verify those v3 hashes. The IdentityV2 compatibility mode makes the new app write v2 hashes instead. The ASP.NET Identity and ASP.NET Core Identity database schemas also differ. An application with its own hashing algorithm will have to replace it. In the audited version of Bonobo Git Server, mentioned below, it was a fast SHA-512.

Session

Remote session works, but Microsoft rates its performance as only fair on its session migration page. Each session key must be registered with its type, or access fails. When you move to native ASP.NET Core session, keys become case-sensitive and the session is no longer locked the way ASP.NET locked it. Every session use you remove before the migration is one less key to register and test.

Libraries tied to System.Web

A third-party package that depends on System.Web won't work in the Core app. Find its ASP.NET Core equivalent or replace it before migrating the routes that use it.

IIS hosting

The MVC 5 application stays deployed on its IIS site during the transition, ideally reachable only through the proxy. Microsoft also requires both applications to use exactly the same virtual directory layout.

What can tools do, Copilot included?

.NET Upgrade Assistant is officially deprecated. Microsoft points to its GitHub Copilot agent, included in Visual Studio 2026 and Visual Studio 2022 17.14.16 or later. Its name varies from page to page: “GitHub Copilot app modernization” in the ASP.NET migration guide, “GitHub Copilot upgrade” in its own documentation.

Its list of skills covers this article's scenario: scaffolding a YARP proxy project next to the .NET Framework app, installing the System.Web adapters, converting Global.asax, OWIN, bundling, child actions and session. Treat these as vendor claims and test them on your own code before planning around them.

Other coding agents, such as Claude Code or Codex, can help on a bounded task: one route or one controller at a time, with a build and tests that must stay green at every step. The coexistence setup, the migration order and the authentication strategy remain architecture decisions, to make before you run any tool.

How do you estimate the effort?

For a first rough estimate, count:

  1. controllers and views;
  2. uses of System.Web, HttpContext.Current and session;
  3. the authentication modes in place: Forms, OWIN, Identity, Windows;
  4. test coverage of controllers and critical paths.

A public example: I audited Bonobo Git Server, an open-source Git server built on ASP.NET MVC 5 and .NET Framework 4.6, with 17,130 lines of C# and 331 tests. The report first recommends 5 to 8 days of quick fixes, including the move to .NET Framework 4.8. Next come tests on the controllers, the Git protocol and the authorization filters, which had no coverage. The migration to .NET 10 is estimated at 30 to 50 days, scheduled within a 3-to-9-month horizon: libraries on netstandard2.0, the site on ASP.NET Core, OWIN replaced by ASP.NET Core authentication middleware, EF6 kept before a move to EF Core. That figure applies to this codebase and doesn't transfer as is to another.

To size your own application, the Migration audit runs this inventory and produces a phased roadmap. You can also get in touch to discuss it.

Frequently asked questions

Further reading

Lire cet article en français