How to modernize a legacy c# web forms application(net 4.5) that uses ado.net & mssql server. Planning to reuse the existing database schema, functions, stored procedures and modernize the UI from existing aspx files.

Virendra Kulkarni 0 Reputation points
2025-08-21T03:37:52.7033333+00:00

I need to modernize a legacy c# web forms based web application targeted for .net 4.5. It uses ado.net to connect to mssql server. I am planning to reuse the existing database schema, functions, stored procedures and the UI from existing aspx files.

Need suggestions on how this can be done efficiently? Appreciate any ai tools that can be helpful

Developer technologies | ASP.NET | ASP.NET Core
{count} votes

2 answers

Sort by: Most helpful
  1. Raymond Huynh (WICLOUD CORPORATION) 715 Reputation points Microsoft External Staff
    2025-08-21T03:56:46.3366667+00:00

    Hello Virendra Kulkarni,

    This is definitely a challenging but doable modernization project! Here are some approaches that tend to work well for legacy Web Forms applications:

    Incremental Migration Strategy:

    1. DotVVM is probably your best bet - It's specifically built for modernizing Web Forms apps without breaking everything. You can convert your ASPX pages one by one to DotVVM views while keeping all your existing database code intact. The syntax is similar enough that the learning curve isn't too steep.
    2. Keep your database layer as-is - Your ADO.NET code and stored procedures don't need to change at all initially. They'll work fine with modern frameworks. You might want to wrap them in repository patterns later for better testability, but that's not urgent.
    3. Target Blazor Server eventually - Once you've modernized the UI layer, Blazor Server makes a lot of sense. The component model feels familiar if you're used to Web Forms controls.

    Tools that can actually help:

    • Microsoft Upgrade Assistant - Free tool that analyzes your code and suggests migration paths
    • AWS Porting Assistant for .NET - Has specific support for Web Forms to Blazor migrations
    • CoreForms - Commercial tool specifically for porting Web Forms to .NET Core
    • Mobilize.Net - They have automated conversion tools that can migrate Web Forms to Angular/ASP.NET Core
    • Telerik conversion wizards - If you're already using Telerik components
    • GitHub Copilot - Surprisingly helpful for converting ASPX markup to modern equivalents

    My suggestion: Start with your most critical or frequently-used pages first. This gives you immediate value and helps you work out the migration process before tackling the entire application.

    The key is not trying to modernize everything at once. Keep what works (your database layer) and modernize what needs it (the UI).

    Hope this helps!


  2. Bruce (SqlWork.com) 79,526 Reputation points Volunteer Moderator
    2025-08-21T16:10:56.34+00:00

    the question is how modern is your code base design wise. did you use SOLID practices, application layers, separation of concerns, etc. Do you need to modernize the design or just the hosting framework?

    ado.net is still supported (EF is built on top of it). if you like ado.net, you might look at dapper. You should move the database code to it own project library which is .net standard 2.0. also the database routines should return POCO objects rather than DataSets (or other ado objects).

    You should also move the business logic to a .net standard 2.0 library.

    There is no modernization of webforms other than a rewrite. As you are used to a component model and event support, you might want to look a javascript framework like react, vue or even Blazor. many AI tools can generate the code for an existing form in any framework you choose.

    0 comments No comments

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.