How can I migrate the web app built using ASP.NET Web Forms .NET Framework 4.7.1 to .NET Core 8?

Vivek Barnwal 26 Reputation points
2025-08-01T09:17:10.04+00:00

Can someone please help me out with the migration steps for upgrading the web app from ASP.NET Web Forms .NET Framework 4.7.1 to .NET Core 8.

I tried to use .NET Upgrade Assistant, but is seems like this extensions doesn't supports for Web Forms.

Any help or lead will be highly appreciated.

Developer technologies | ASP.NET | Other
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. Bruce (SqlWork.com) 79,101 Reputation points Volunteer Moderator
    2025-08-01T16:19:44.45+00:00

    there is no webform support in .net core. you will need recode the webform UI code.

    to start, you should move as much code out of the webform project into separate projects which you can upgrade to netstandard 2.0, and then after migration .net 8

    to replace the webform code, you have two options.

    the first is Razor pages, which is a template engine approach. there is no support for client events, you use a post back model. also as template engine, there is not the concept of a control tree like in webforms.

    https://learn.microsoft.com/en-us/aspnet/core/razor-pages/?view=aspnetcore-9.0&tabs=visual-studio

    the second is Blazor app. Blazor apps use Razor syntax, but builds a control render tree like webforms and supports client events. a Server Blazor app hosts a persistent connection (signal/r) to the browser, and has a dedicated application instance for each user. Blazor also has a client mode, but this builds a client SPA app like angular or react, but in C#.

    https://dotnet.microsoft.com/en-us/apps/aspnet/web-apps/blazor

    You didn't specify your language, but asp.net core only supports C# and F#. If you have VB code, it is only supported via referenced class libraries.

    as webforms migration requires a lot of recoding, Microsoft has an incremental migration approach, using a reverse proxy. you basically run both the old site, and new site, but the proxy makes t look like one site. also session and authentication cookies can be shared between the two sites:

    https://learn.microsoft.com/en-us/aspnet/core/migration/fx-to-core/?view=aspnetcore-9.0


  2. SurferOnWww 4,811 Reputation points
    2025-08-03T01:22:00.65+00:00

    Don't you consider migrating .NET Framework 4.7.2 to 4.8.1? If your concern is only support period, the support period of .NET Framework 4.8.1 will probably be longer than that of .NET 8.0.

    Microsoft .NET and .NET Core

    The end date of .NET 8 (LTS) support is Nov 10, 2026.

    .NET Framework Support Policy

    ".NET Framework 4.8.1 is the latest version of .NET Framework and will continue to be distributed with future releases of Windows. As long as it is installed on a supported version of Windows, .NET Framework 4.8.1 will continue to also be supported."

    IMO, migrating the existing ASP.NET Web Forms app to .NET is not practical.


  3. Jack Dang (WICLOUD CORPORATION) 1,020 Reputation points Microsoft External Staff
    2025-08-05T02:54:21.75+00:00

    Hi @Vivek Barnwal ,

    Thanks for reaching out.

    Migrating your ASP.NET Web Forms application from .NET Framework 4.7.1 to .NET 8 requires significant effort, as .NET 8 does not support Web Forms, and tools like the .NET Upgrade Assistant cannot directly handle Web Forms projects. Below is a step-by-step guide to help you with the migration:

    1. Analyze Your Application: Review your application to separate business logic, data access, and UI code. Move non-UI code (e.g., business logic, data access) into class libraries to maximize reuse and isolate Web Forms-specific code.
    2. Refactor to .NET Standard 2.0: Migrate reusable non-UI cheeky to .NET Standard 2.0 class libraries, which are compatible with both .NET Framework and .NET 8. Later, these libraries can be updated to target .NET 8.
    3. Select a New UI Framework: Since Web Forms is not supported in .NET 8, choose an alternative:
      • Razor Pages: Ideal for simple, page-based applications. It uses a post-back model but lacks Web Forms’ control tree or client-side events. Convert Web Forms pages to Razor Pages by mapping post-back events to form submissions or AJAX calls. See: https://learn.microsoft.com/en-us/aspnet/core/razor-pages/
      • Blazor: Offers a component-based model similar to Web Forms’ control tree, with support for client-side events.
        • Blazor Server: Uses SignalR for server-side processing, suitable for applications requiring server logic.
        • Blazor WebAssembly: Runs as a C#-based SPA in the browser, comparable to Angular or React. Map Web Forms controls to Blazor components with event bindings. See: https://dotnet.microsoft.com/en-us/apps/aspnet/web-apps/blazor
    4. Rewrite the UI: Recreate Web Forms pages in your chosen framework. For Razor Pages, focus on form submissions; for Blazor, leverage component-based event handling. This step requires significant effort, so prioritize high-impact pages.
    5. Address Language Compatibility: .NET 8 supports only C# and F#. If your application uses VB.NET, either rewrite VB.NET code in C# or maintain VB.NET code in .NET Standard 2.0 libraries, as VB.NET is not supported in ASP.NET Core.
    6. Adopt Incremental Migration: Use a reverse proxy (e.g., YARP) to run your Web Forms and .NET 8 applications side by side, presenting them as a single site. Share session state and authentication cookies to ensure a seamless user experience. See: https://learn.microsoft.com/en-us/aspnet/core/migration/fx-to-core/
    7. Consider .NET Framework 4.8.1: If your goal is extended support, upgrading to .NET Framework 4.8.1 may be a simpler alternative. It remains supported as long as it runs on a supported Windows version, potentially outlasting .NET 8’s support (ending November 10, 2026). This avoids a UI rewrite but limits you to .NET Framework.
    8. Update Authentication: Migrate authentication mechanisms (e.g., ASP.NET Membership) to ASP.NET Core Identity or another .NET 8-compatible solution, as Web Forms authentication may not be directly compatible.
    9. Test and Validate: Thoroughly test the migrated application for functionality, performance, and compatibility. Pay attention to session management, authentication, and third-party dependencies, which may behave differently in .NET 8.
    10. Manage Dependencies: Update third-party libraries to .NET 8-compatible versions. If unavailable, find alternatives or reimplement functionality.
    11. Deploy and Monitor: Deploy to a .NET 8-compatible environment (e.g., Windows, Linux, or Docker) and test in a staging environment. Monitor for performance issues, especially with Blazor Server’s SignalR connection or Blazor WebAssembly’s client-side load.

    Given the complexity of rewriting the UI, assess your application’s size and weigh the benefits of .NET 8 (e.g., cross-platform support, performance) against upgrading to .NET Framework 4.8.1 for stability. Blazor Server is often the closest match to Web Forms’ architecture, while Razor Pages suits simpler applications. Plan for significant development time and consider consulting with a team experienced in .NET migrations.

    Hope this helps! If you agree with my suggestion, feel free to interact with the system accordingly!


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.