dotnet-legacy-aspnet

Maintain classic ASP.NET applications on .NET Framework and plan incremental migration to ASP.NET Core.

Updated Mar 31, 2026
One-click install
npx skills add https://github.com/zhenpengLai/myuseskill --skill dotnet-legacy-aspnet-zhenpenglai
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: dotnet-legacy-aspnet
Source: https://github.com/zhenpengLai/myuseskill/tree/main/dotnet-legacy-aspnet
Command: npx skills add https://github.com/zhenpengLai/myuseskill --skill dotnet-legacy-aspnet-zhenpenglai

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Classic ASP.NET applications on .NET Framework (Web Forms, MVC 5, IIS-hosted apps) require maintenance and modernization guidance that differs fundamentally from ASP.NET Core, and applying Core-era advice to legacy stacks causes breakage and risky rewrites. ## Core Features & Use Cases - Legacy Stabilization: Apply maintenance patterns for Web Forms and MVC 5, including DI introduction, ViewState reduction, session/cache abstraction, and configuration transform management. - Migration Planning: Choose between incremental migration, strangler fig pattern, or full rewrite, with component-specific paths for Web Forms, MVC, session, caching, and HTTP modules. - Use Case: A team maintaining a large Web Forms application uses this Skill to extract business logic into testable services, then migrates page-by-page to Razor Pages behind a reverse proxy without disrupting production. ## Quick Start Help me stabilize my legacy Web Forms application and plan an incremental migration to ASP.NET Core.

Frequently Asked Questions about dotnet-legacy-aspnet

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I migrate Web Forms to ASP.NET Core?▼

Web Forms has no direct ASP.NET Core equivalent, so map pages to Razor Pages, Blazor Server, or MVC depending on your needs. Replace server controls with Tag Helpers or components, move code-behind logic to PageModel handlers, and replace ViewState with explicit state management.

How to migrate ASP.NET MVC 5 to ASP.NET Core MVC?▼

Replace RouteConfig with endpoint routing, migrate action filters to ASP.NET Core filter contracts, move from third-party containers to built-in DI, and replace Web.config with appsettings.json. Cookie authentication middleware replaces Forms Authentication.

Can I migrate a legacy ASP.NET app without a full rewrite?▼

Yes, use incremental migration or the strangler fig pattern: run an ASP.NET Core app alongside the legacy app, route traffic with YARP or a reverse proxy, and migrate one vertical slice at a time. Full rewrites are only recommended for small, well-understood applications.

Does ASP.NET Core guidance apply to classic ASP.NET on .NET Framework?▼

No, classic ASP.NET has different hosting, lifecycle, and configuration rules. Middleware, built-in DI, HttpContext.Current, and Global.asax events do not transfer directly, so mixing Core guidance into legacy maintenance causes breakage.

How do I make legacy ASP.NET code testable without rewriting it?▼

Extract business logic from code-behind into standalone service classes, wrap static dependencies like HttpContext.Current and ConfigurationManager behind interfaces, and use extract-and-override test seams. Introduce a DI container compatible with System.Web such as Autofac.

What are common pitfalls when migrating ASP.NET to ASP.NET Core?▼

Common pitfalls include assuming API compatibility, ignoring IIS pipeline dependencies, expecting sticky session behavior, relying on ViewState, and using HttpContext.Current, which does not exist in Core. Capture performance baselines and run both stacks in parallel to mitigate risk.