ASP.NET Web Forms support and migration

We maintain Web Forms applications and move them to ASP.NET Core one page at a time, with old and new pages served from the same addresses, so users keep working throughout.

Vendor support

ASP.NET Web Forms
Supported
Security fixes
No end date announced

What you probably want to know first

Can you support our existing application?
Yes, provided you hold the source code or can obtain it. We maintain Web Forms applications on .NET Framework 4.8 and retarget older ones to it. Support is harder where the application depends on third-party control suites that are no longer updated, or where business rules are buried in code-behind, because each change then carries more risk.
What happens in the first assessment?
Usually our fixed-price .NET upgrade assessment, which takes one to two weeks. After a short call and read access to the code, we build the solution, run automated compatibility analysis and read by hand the areas tools cannot judge, including which pages must be rebuilt. You get a written report with a staged plan and a walk-through call.
What access do you need?
Read access to the source code and, where possible, read-only access to the hosting environment and the database. Nothing changes on the live system: we work from a copy of the code, and where we look at production it is with read-only access. A confidentiality agreement can be signed before anything is shared.
What sets the cost and the timescale?
For the assessment: the size of the solution and the number of separate applications, how many third-party controls need individual investigation, and whether technology is mixed, such as Web Forms, WCF and desktop clients together. The migration is sized by the number of pages and how much logic sits in code-behind, and is quoted one stage at a time.
What have you done with systems like ours?
We have worked mostly on the Microsoft stack since 2012, and most of the systems we maintain were built by someone else. The Logtek case study describes taking over a custom asset management application, moving it to the cloud and maintaining and extending it since. The rest of our case studies are on the site.

Desktop-style programming for the web

Web Forms was Microsoft’s first web framework for .NET, released in 2002. It let developers build web pages the way they built Windows desktop screens: drop controls onto a page, double-click a button and write the code that runs when it is clicked. Many internal business systems, customer portals and back-office tools were built this way, and plenty are still in daily use.

To make that model work in a browser, Web Forms hides a good deal. Each page carries its state in a hidden field called ViewState, and each click posts the whole form back to the server, which rebuilds the page and runs the event handlers in its code-behind file. Web Forms is still supported as part of .NET Framework 4.8, but it is not available on modern .NET.

What tends to go wrong

  • ViewState grows. A page with large grids sends its entire state to the server and back on every click, and users experience that as a slow system.
  • Logic lives in code-behind. Business rules, data access and screen handling are mixed together in event handlers, so a rule cannot be tested or reused without the page around it.
  • The page lifecycle causes subtle bugs. Behaviour depends on the order of events such as Init, Load and PreRender, and on whether the request is a postback. A change in one handler can break another.
  • UpdatePanels hide the cost. Partial-page updates are quick to add, but each one still runs the full page lifecycle on the server.
  • Control suites age. Grids, editors and report viewers bought from third-party vendors years ago may no longer be updated, and older versions were written for the browsers of their day.
  • It blocks the move to modern .NET. The rest of an application may convert with modest changes. The pages cannot.

Your options

Stay on Web Forms and maintain it. A reasonable choice for a stable application with few changes. It should target .NET Framework 4.8 and run on a supported version of Windows Server. Anything targeting an older version should at least be retargeted.

Migrate page by page. The usual choice for a system with years of life ahead. Pages are rebuilt in ASP.NET Core using MVC, Razor Pages or Blazor, and each one takes over the address of the page it replaces. Old and new run together until the last page has moved.

Replace the application. Worth considering only when the system no longer fits how the business works. A Web Forms application usually holds years of tested business rules, and a replacement has to rediscover every one of them.

How we approach a migration

The first job is separating logic from pages. Rules and data access buried in code-behind are moved into plain classes, with tests, in libraries that both .NET Framework and modern .NET can use. This is worth doing even if the migration stops there, because it makes the existing application easier to change.

Next, an ASP.NET Core application is placed in front of the Web Forms one. It receives every request, serves the pages it has taken over and passes everything else through to the old application. Sign-in is shared between the two, so users log in once and cannot tell which application produced a page.

Pages then move in groups that belong together, such as everything to do with orders, starting with the areas that change most. Third-party controls are replaced as their pages move. Each group goes live on its own and can be routed back to the old pages if something is wrong.

The wider move from .NET Framework to modern .NET usually runs alongside it, and a .NET upgrade assessment is a fixed-price way to find out what your application involves. For version dates, see the .NET end-of-support dates.

Recommended next step

.NET upgrade assessment

It tells you which pages must be rebuilt, what can be kept and in what order to move, at a fixed price and in one to two weeks, so the migration is sized before any stage of it is quoted.

What we do with Web Forms applications

Maintain it on .NET Framework 4.8
Fixes, changes and security updates for a Web Forms application that stays where it is.
Bring older versions up to 4.8
Applications targeting 4.5 or 4.6 are retargeted to 4.8, which puts the runtime back in support.
Separate logic from the pages
Business rules buried in code-behind are moved into plain classes that old and new pages can both call.
Migrate page by page
Each page is rebuilt in ASP.NET Core MVC, Razor Pages or Blazor and takes over its existing address.
Replace third-party controls
Grids, editors and report viewers from old control suites are swapped for current equivalents.
Lighten the pages that stay
Where pages remain on Web Forms, we cut the ViewState and postback traffic that slows them down.

How a page-by-page migration runs

  1. Inventory the pages

    We list every page, user control, master page and third-party control, and note how often each is used and changed.

  2. Get onto 4.8 and under test

    The application is retargeted to .NET Framework 4.8 and automated checks are added around the main workflows.

  3. Pull logic out of code-behind

    Business rules and data access move into shared libraries that both the old and the new application can use.

  4. Put a new application in front

    An ASP.NET Core application receives every request, serves the pages it has taken over and passes the rest to Web Forms.

  5. Move pages and retire Web Forms

    Pages move in related groups, most-changed first. When the last one has moved, the old application is switched off.

Support dates

Status is worked out against today's date each time this site is rebuilt. Dates come from the Microsoft .NET support policy; check there before relying on them.

ASP.NET Web Forms support dates
Version Released Security fixes end Status today
ASP.NET Web FormsSupported as part of .NET Framework 4.8, but not available on modern .NET. 13 February 2002 No date announced Supported
.NET Framework 4.7 to 4.8.1Supported for as long as the Windows version it is installed on. No new features. 5 April 2017 No date announced Supported
.NET Framework 4.5.2, 4.6 and 4.6.1 5 May 2014 26 April 2022 Support ended

All .NET and .NET Framework end-of-support dates

A good fit when

  • The application works, but every change to a page is slow and risky.
  • Third-party control suites it depends on are no longer updated.
  • You want to move to modern .NET and Web Forms is the part that cannot come with you.
  • Pages are slow because of large ViewState or full-page postbacks.

Probably not for you if

  • The application is on 4.8 and rarely changes; leaving it on Web Forms is a reasonable decision and we will say so.
  • The system is due to be replaced by a packaged product in the near future.

Questions we are asked

Is ASP.NET Web Forms still supported?

Yes. Web Forms is part of .NET Framework, and versions 4.7 to 4.8.1 are supported for as long as the Windows version they run on, with no end date announced. Applications still targeting 4.5.2, 4.6 or 4.6.1 have been out of support since April 2022. Supported means security fixes only: Web Forms receives no new features.

Can Web Forms run on modern .NET?

No. Web Forms is not available on modern .NET, so there is no upgrade that converts a Web Forms project. The pages have to be rebuilt in ASP.NET Core MVC, Razor Pages or Blazor. Business logic and data access can usually be kept.

Which should we move to: MVC, Razor Pages or Blazor?

It depends on the application and the team. Razor Pages suits form-based pages that each do one job. MVC suits larger applications with patterns shared across many screens. Blazor is built from components, which will feel the most familiar to Web Forms developers, and suits highly interactive screens. We recommend one after seeing the code.

Will the web addresses change?

They do not have to. The new application can answer on the existing addresses, including the ones ending in .aspx, so bookmarks, links in old emails and integrations keep working.

How long does a Web Forms migration take?

It depends on the number of pages and how much logic sits in code-behind. A small application can move in a matter of weeks. A large one with hundreds of pages and heavy use of third-party controls is a staged programme over months. The page inventory gives a specific answer.

Tell us about your system

Say what it does, what it is built on and what is worrying you. We will reply with what we would look at first and whether we are the right people to help.

Discuss your Web Forms application 0800 433 7990 Monday to Friday, 9am to 5pm. A first 20-minute call is free, and we reply to every enquiry within one working day. What happens after you get in touch