Migration assessment · .NET Framework → .NET 10

LegacyShop

Go, with conditions   Generated 2026-11-25 15:44

A small app with every classic .NET Framework trap in it. Worth moving incrementally - after two decisions: how sign-in and the session cart work while both apps run.

Size
M
18 units of work, 4 projects
Without AI
21-47 days
128-280 hours
With an AI agent
11-25 days
68-149 hours, incl. review
AI can take over
~62%
of the hands-on work
Hard blockers
4
25 blocker signals in total

Executive summary

Recommended path: Port to .NET 10 incrementally (strangler fig): new ASP.NET Core host with YARP in front, System.Web adapters for shared code, CoreWCF for the inventory service, EF 6.5 as a bridge before EF Core.

Nothing blocks the move for good: the 4 hard blockers (HttpContext.Current in a library, BinaryFormatter, the WCF server, System.Web in a library) all have known fixes. The risk is behavior, not code - 9 pricing and cart quirks that customers see. Lock them with parity tests before touching anything, then move the read-only pages and the API first.

Top risks

Where the effort goes

Decisions10-22 h → 10-22 h with AI
Mechanical changes12-25 h → 4-8 h with AI
Translating code70-148 h → 33-70 h with AI
Tests and proof18-45 h → 7-18 h with AI
Hosting and rollout18-40 h → 14-31 h with AI
without AIwith an AI agent

Who does what

Mechanical changesAI ~90% · human ~10%
AI: Project files, packages, namespaces, config files, Program.cs wiring. Human: Reviews the diff.
Translating codeAI ~70% · human ~30%
AI: Pages, controllers, endpoints, EF mappings, CoreWCF contracts - first full draft. Human: Reviews, fixes edge cases, UI polish.
Tests and proofAI ~80% · human ~20%
AI: Writes parity, characterization and contract tests. Human: Decides what "the same behavior" means, accepts differences.
DecisionsAI ~0% · human ~100%
AI: Lays out options and trade-offs. Human: Decides: auth, session, hosting, UI targets, data.
Hosting and rolloutAI ~30% · human ~70%
AI: Drafts pipelines, scripts and checklists. Human: Owns hosting, release, monitoring, sign-off.
AI agentdeveloper

Architecture today and after the move

flowchart LR
  browser(["Browser / API clients"])
  nLegacyShopCore["LegacyShop.Core<br/><small>class library &middot; v4.8 &middot; 128 LOC</small>"]
  nLegacyShopData["LegacyShop.Data<br/><small>class library &middot; v4.8 &middot; 304 LOC</small>"]
  nLegacyShopInventory["LegacyShop.Inventory<br/><small>WCF service &middot; v4.8 &middot; 89 LOC</small>"]
  nLegacyShopWeb["LegacyShop.Web<br/><small>ASP.NET web app &middot; v4.8 &middot; 6 pages, 3 controllers</small>"]
  browser --> nLegacyShopWeb
  nLegacyShopInventory --> nLegacyShopData
  nLegacyShopWeb --> nLegacyShopCore
  nLegacyShopWeb --> nLegacyShopData
  db[("SQL database<br/><small>EF6</small>")]
  nLegacyShopData --> db
  nLegacyShopWeb -. SOAP .-> nLegacyShopInventory
  classDef old fill:#eee,stroke:#999,color:#333;
Today: projects, references and what talks to what.
flowchart LR
  browser(["Browser / API clients"])
  subgraph host["ASP.NET Core on .NET 10"]
    nRazorPages["Razor Pages<br/><small>5 pages</small>"]
    nBlazorInteractiveServer["Blazor (Interactive Server)<br/><small>1 page</small>"]
    api["API controllers<br/><small>2 from Web API 2</small>"]
    mvc["MVC controllers + view components<br/><small>1 from MVC 5</small>"]
    mw["Middleware + endpoints<br/><small>2 modules/handlers</small>"]
  end
  corewcf["CoreWCF service<br/><small>same SOAP contract</small>"]
  nLegacyShopCore["LegacyShop.Core<br/><small>net10.0</small>"]
  nLegacyShopData["LegacyShop.Data<br/><small>net10.0</small>"]
  db[("SQL database<br/><small>EF Core</small>")]
  browser --> host
  host --> nLegacyShopCore
  host --> nLegacyShopData
  host -. SOAP .-> corewcf
  host --> db
Target: one ASP.NET Core host on .NET 10. WebForms targets are chosen per page (see the table below).

How the move works: strangler fig

Nothing is rewritten in one go. A new .NET 10 app sits in front of the old one. Every request it can already handle stays in the new app; everything else falls through to the old app. One route at a time moves over - after parity tests prove the new route answers like the old one.

flowchart LR
  browser(["Browser / API clients"]) --> yarp
  subgraph newapp["New .NET 10 app"]
    yarp{"YARP<br/><small>route already migrated?</small>"}
    done["Migrated routes<br/><small>tested with parity tests</small>"]
  end
  subgraph oldapp["Old app (.NET Framework)"]
    legacy["LegacyShop.Web<br/><small>everything not migrated yet</small>"]
  end
  yarp -- yes --> done
  yarp -- no / fallback --> legacy
  done -. "remote session + remote auth<br/>(System.Web adapters)" .-> legacy
  style done fill:#e3f5ea,stroke:#2d7a52,color:#14361f
  style legacy fill:#f1f1f1,stroke:#999,color:#333
Both apps run side by side until the last route has moved.

Roadmap

gantt
  dateFormat YYYY-MM-DD
  axisFormat %d %b
  excludes weekends
  section With an AI agent (1 developer)
  Decisions :p0, 2026-11-30, 3d
  Safety net (tests first) :p1, after p0, 3d
  Foundations - projects, packages, libraries :p2, after p1, 2d
  New .NET 10 host + YARP :p3, after p2, 2d
  Migrate slice by slice :p4, after p3, 7d
  Auth, session and cross-cutting code :p5, after p4, 3d
  Rollout and shut down the old app :p6, after p5, 3d
Calendar time with an AI agent and one developer (midpoint of the range, 6 focused hours a day). Decisions can run in parallel with the safety net.

WebForms: target per page

PageSizeTargetWhyHours
Cart.aspxMRazor PagesUses session state, and interactive Blazor has no HttpContext or session. Postback handlers map to Razor Pages handlers.
Uses session (directly or through a helper).
Human: Decide whether the stored order total should include coupon, shipping and VAT (quirk Q4)
4-8
Product.aspxMRazor PagesUses session state, and interactive Blazor has no HttpContext or session. Keep it a page; replace the UpdatePanel with a small fetch to a page handler.
Keeps data in ViewState (6 uses) - make that state explicit. Uses session (directly or through a helper). UpdatePanel partial postbacks.
Human: Decide whether 'Add to cart' keeps the price from page load (quirk Q3)
4-8
Site.MasterSLayout (+ view component)Master pages become a shared layout; code-behind logic moves into a view component or partial.
Uses session (directly or through a helper).
1-2
Default.aspxMRazor PagesList/form page: postback handlers map to Razor Pages handlers, GET pages stay linkable and cacheable.
Keeps data in ViewState (2 uses) - make that state explicit.
4-8
Error.aspxSRazor PagesList/form page: postback handlers map to Razor Pages handlers, GET pages stay linkable and cacheable.2-4
Admin/Products.aspxLBlazor (Interactive Server)Heavy in-page interactivity (inline grid editing, 5 postback handlers) maps to components better than to page handlers.
Talks to the database from code-behind - extract a service first.
Human: Confirm Blazor is fine for the admin area (only admins use it)
10-18
Controls/MiniCart.ascxSView component (Razor Pages) or Blazor componentPick the same technology as the pages that host it.
Uses session (directly or through a helper).
1-2
Account/Login.aspxSRazor PagesSigns users in/out or writes cookies - needs a real HTTP request, which interactive Blazor doesn't have.2-4

Every unit of work

UnitKindSizeTargetWithout AIWith AI
LegacyShop.Core
LegacyShop.Core/LegacyShop.Core.csproj
References System.Web - needs Microsoft.AspNetCore.SystemWebAdapters or an abstraction.
librarySnetstandard2.0 or net10.0 (multi-target during the move)2-4 h1-1 h
ShopContext
LegacyShop.Data/ShopContext.cs
Lazy loading via virtual navigations - EF Core needs Include or proxies. Database initializer + Seed - no EF Core equivalent.
Human: Decide Restrict vs Cascade for Product -> OrderLine
ef-contextSEF 6.5 on .NET 10 first, then EF Core7-16 h3-8 h
LegacyShop.Data
LegacyShop.Data/LegacyShop.Data.csproj
librarySnetstandard2.0 or net10.0 (multi-target during the move)2-4 h1-1 h
IInventoryService
LegacyShop.Inventory/IInventoryService.cs
wcf-serviceSCoreWCF (same contract)4-9 h2-4 h
Handlers/ProductImage.ashx
LegacyShop.Web/Handlers/ProductImage.ashx
http-handlerSMinimal API endpoint or middleware1-3 h0-1 h
Global.asax
LegacyShop.Web/Global.asax.cs
Events: Application_Start, Session_Start, Session_End, Application_PostAuthenticateRequest, Application_Error. Session_End has no ASP.NET Core equivalent.
global-asaxMProgram.cs + middleware3-6 h1-3 h
ProductsController
LegacyShop.Web/Api/ProductsController.cs
webapi-controllerMASP.NET Core controller3-6 h1-3 h
OrdersController
LegacyShop.Web/Api/OrdersController.cs
Uses HttpContext.Current (directly or through a helper).
Human: Accept 401 instead of 302 for unauthenticated calls
webapi-controllerSASP.NET Core controller1-3 h0-1 h
ReportsController
LegacyShop.Web/Controllers/ReportsController.cs
Child actions become view components. [OutputCache] -> ASP.NET Core output caching middleware.
mvc-controllerSASP.NET Core MVC controller + views3-6 h1-3 h
RequestTimingModule
LegacyShop.Web/Modules/RequestTimingModule.cs
http-moduleSMiddleware1-3 h0-1 h
Safety net: parity + characterization tests
Human: Decide what "the same behavior" means (which differences are OK); Review the recorded requests and the normalization rules
Tests and proof18-45 h7-18 h
New .NET 10 host with YARP + System.Web adapters
Human: Hosting decision (IIS, containers, cloud); Routing and TLS in front of both apps
Hosting and rollout8-16 h6-12 h
Authentication & authorization design
Human: Cookie auth vs Identity vs external IdP; Shared sign-in while both apps run (remote auth); Role and policy model
Decisions4-8 h4-8 h
Authentication & authorization implementation
Human: Test sign-in, sign-out and expiry in both apps
Translating code8-16 h4-8 h
Session state strategy
Human: Keep session (remote/distributed) or remove it; What lives in session today and why
Decisions2-4 h2-4 h
Session state implementationTranslating code4-8 h2-4 h
Configuration: web.config -> appsettings + Options
Human: Where secrets live in production
Mechanical changes2-5 h1-2 h
machineKey -> Data Protection key ring
Human: Key storage and rotation
Decisions2-6 h2-6 h
Replace BinaryFormatter
Human: Check that existing serialized data can be read or safely dropped
Translating code2-6 h1-3 h
Image processing without System.Drawing
Human: Windows hosting vs ImageSharp/SkiaSharp (licenses!)
Decisions2-4 h2-4 h
Port image codeTranslating code4-8 h2-4 h
WCF clients: config -> codeTranslating code2-4 h1-2 h
Static assets and bundlingMechanical changes2-4 h1-1 h
SDK-style projects + PackageReference + CPMMechanical changes4-8 h1-3 h
Deployment, CI/CD and rollout
Human: Release plan, monitoring, rollback; Who signs off each switched route
Hosting and rollout8-20 h6-16 h
Remove YARP fallback + adapters, shut down the old app
Human: Final go/no-go
Hosting and rollout2-4 h2-3 h
TotalM128-280 h68-149 h

Blockers found in the code

SeveritySignalHitsWhat it means / the fixWhere
hardHttpContext.Current9Static access to the request - not available in ASP.NET Core. Fix: IHttpContextAccessor / pass the user in; System.Web adapters while both apps run.LegacyShop.Core/CurrentUser.cs
LegacyShop.Web/Api/OrdersController.cs
LegacyShop.Web/Infrastructure/CartSession.cs
hardSystem.Web in a library2Class library compiled against System.Web. Fix: Microsoft.AspNetCore.SystemWebAdapters, then remove.LegacyShop.Core/CurrentUser.cs
hardBinaryFormatter3Removed in .NET 9+ and insecure. Fix: System.Text.Json / MessagePack / protobuf.LegacyShop.Web/Infrastructure/DiskCache.cs
hardWCF service (server)1No WCF server in .NET 10. Fix: CoreWCF (same contract) or gRPC/REST.LegacyShop.Inventory/IInventoryService.cs
mediumViewState8WebForms page state. Fix: Explicit state: hidden fields, query string, component state.LegacyShop.Web/Product.aspx.cs
LegacyShop.Web/Default.aspx.cs
mediumUpdatePanel1Partial postbacks. Fix: Blazor interactivity or a small fetch + partial.LegacyShop.Web/Product.aspx
mediumSession state2InProc session with objects. Fix: ASP.NET Core session (serialized) or a store; remote session while both apps run.LegacyShop.Web/Global.asax.cs
LegacyShop.Web/Infrastructure/CartSession.cs
mediumForms authentication7Forms auth cookie and ticket. Fix: ASP.NET Core cookie auth / Identity; remote authentication during the move.LegacyShop.Web/Site.Master.cs
LegacyShop.Web/Web.config
LegacyShop.Web/Account/Login.aspx.cs
mediummachineKey1Shared keys for cookies and ViewState. Fix: Data Protection; shared key ring if cookies must work in both apps.LegacyShop.Web/Web.config
mediumIHttpModule2HTTP module in the IIS pipeline. Fix: Middleware.LegacyShop.Web/Modules/RequestTimingModule.cs
mediumIHttpHandler / .ashx2Custom HTTP handler. Fix: Endpoint / middleware.LegacyShop.Web/Handlers/ProductImage.ashx.cs
mediumSystem.Drawing2GDI+ - Windows-only on .NET 6+. Fix: ImageSharp / SkiaSharp, or stay on Windows hosting.LegacyShop.Web/Handlers/ProductImage.ashx.cs
mediumConfigurationManager5Reads Web.config / App.config. Fix: IConfiguration + IOptions.LegacyShop.Core/AppSettings.cs
mediumWCF client config4WCF client built from system.serviceModel config. Fix: System.ServiceModel.* NuGet packages; endpoint and binding in code.LegacyShop.Web/Web.Release.config
LegacyShop.Web/Web.config
LegacyShop.Web/Services/InventoryClient.cs
mediumGlobal.asax1Application lifecycle events. Fix: Program.cs, middleware, hosted services.LegacyShop.Web/Global.asax.cs
mediumEF6-only APIs6APIs that don't exist in EF Core. Fix: EF Core equivalents (HasOne, .Date, ...).LegacyShop.Data/OrderRepository.cs
LegacyShop.Data/ShopContext.cs
lowApplication state6Global mutable state. Fix: Singleton service or cache.LegacyShop.Web/Global.asax.cs
lowBundling (System.Web.Optimization)8Runtime bundling and minification. Fix: Static files + a build-time bundler, or plain tags.LegacyShop.Web/Web.config
LegacyShop.Web/Global.asax.cs
LegacyShop.Web/Views/Web.config
LegacyShop.Web/App_Start/BundleConfig.cs
lowWeb.config transforms5Per-environment config via XDT. Fix: appsettings.{Environment}.json + environment variables.LegacyShop.Web/Web.Release.config
lowMVC child actions3Child actions. Fix: View components.LegacyShop.Web/Controllers/ReportsController.cs
LegacyShop.Web/Views/Reports/Index.cshtml
lowOutputCache attribute1MVC 5 output caching. Fix: Output caching middleware.LegacyShop.Web/Controllers/ReportsController.cs
lowNewtonsoft.Json formatter2Web API 2 JSON settings (and XML negotiation). Fix: System.Text.Json options (or AddNewtonsoftJson).LegacyShop.Web/App_Start/WebApiConfig.cs
lowEF6 database initializer2Initializers + Seed. Fix: EF Core migrations + seeding.LegacyShop.Data/ShopInitializer.cs
LegacyShop.Web/Global.asax.cs
lowOld-style .csproj4Non-SDK project format. Fix: Convert to SDK-style (legacy-package-migrator / upgrade tooling).LegacyShop.Core/LegacyShop.Core.csproj
LegacyShop.Data/LegacyShop.Data.csproj
LegacyShop.Inventory/LegacyShop.Inventory.csproj
LegacyShop.Web/LegacyShop.Web.csproj
lowpackages.config3Old NuGet management. Fix: PackageReference + Central Package Management (legacy-package-migrator).LegacyShop.Data/LegacyShop.Data.csproj
LegacyShop.Inventory/LegacyShop.Inventory.csproj
LegacyShop.Web/LegacyShop.Web.csproj

Projects and packages

ProjectKindFrameworkLOCFormatPackages
LegacyShop.Corelibraryv4.8128old-style-
LegacyShop.Datalibraryv4.8304old-style, packages.configEntityFramework 6.4.4 bridge
LegacyShop.Inventorywcfv4.889old-style, packages.configEntityFramework 6.4.4 bridge
LegacyShop.Webwebv4.8877old-style, packages.configAntlr 3.5.0.2 remove
EntityFramework 6.4.4 bridge
Microsoft.AspNet.Mvc 5.2.9 replace
Microsoft.AspNet.Razor 3.2.9 replace
Microsoft.AspNet.Web.Optimization 1.1.3 remove
Microsoft.AspNet.WebApi 5.2.9 replace
Microsoft.AspNet.WebApi.Client 5.2.9 replace
Microsoft.AspNet.WebApi.Core 5.2.9 replace
Microsoft.AspNet.WebApi.WebHost 5.2.9 replace
Microsoft.AspNet.WebPages 3.2.9 replace
Microsoft.Web.Infrastructure 2.0.0 remove
Newtonsoft.Json 12.0.3 ok
WebGrease 1.6.0 remove

Risks and how to reduce them

ImpactRiskMitigation
highPricing and cart quirks change silently (order total ignores coupon/VAT, ViewState price, 3-for-2 per line, rounding)Parity tests on the cart and checkout flow + characterization tests on PriceCalculator before any change. Decide quirk by quirk: keep or fix on purpose.
highSign-in breaks while two apps run (Forms auth ticket + machineKey)Remote authentication through the System.Web adapters until the login page moves; then switch to ASP.NET Core cookie auth in one release.
mediumSession cart lost between old and new pagesRemote session (System.Web adapters) while both apps run; move cart pages together; serialize CartLine as JSON.
mediumAPI clients depend on 302 redirects from [Authorize] endpointsCheck API consumers. .NET 10 returns 401 - document it as a breaking change or keep the redirect on purpose.
mediumDeleting a product deletes its order history (EF6 cascade)Decide Restrict vs Cascade in the EF Core model; add a soft delete if history must stay.
lowProduct images use System.Drawing (Windows-only on .NET 6+)Stay on Windows hosting at first, or move to ImageSharp/SkiaSharp (check the licenses).

Questions for the team

Next steps

  1. Decide the 4 open questions above (1 meeting).
  2. Run migration-safety-net: record parity tests for all 6 pages and 5 API actions, characterization tests for PriceCalculator.
  3. Convert all projects to SDK-style + PackageReference (legacy-package-migrator), multi-target LegacyShop.Core and LegacyShop.Data.
  4. Run yarp-strangler-setup: .NET 10 host in front, everything proxied, remote auth + remote session on.
  5. Move the first slices: Web API (GET endpoints), the image handler, the MVC report, Default.aspx - then Product, Cart, Login, Admin.

How these numbers were made