Migrates ASP.NET Framework config, auth, and cross-cutting concerns to .NET 10: web.config to appsettings, machineKey to Data Protection, Forms/Membership/OWIN to ASP.NET Core cookie auth or Identity, session state, BinaryFormatter, and error handling. Includes remote authentication while both apps run.
Ships in .NET Pack (legacy .NET Framework + Migration Pack to .NET 10). Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
The pages and controllers are the visible part. Sign-in, session, configuration and secrets are where users notice a broken migration. Each piece below has a "while both apps run" step and a "final" step - do them in that order.
Web.config (+ transforms), Global.asax.cs, every ConfigurationManager use, the login / logout code, the role setup, <location> rules, every session key and what writes it, Application[...] uses, BinaryFormatter uses, error handling.
| Old | New |
|---|---|
<appSettings> keys used through ConfigurationManager.AppSettings | appsettings.json sections + IOptions<T> classes (group keys by prefix: Shop.* -> ShopOptions) |
<connectionStrings> | ConnectionStrings section + GetConnectionString |
Web.Release.config (XDT transforms) | appsettings.Production.json + environment variables |
| Secrets in Web.config | user secrets (dev), environment variables / Key Vault (prod) - never in appsettings.json |
Static AppSettings helper in a library | inject IOptions<T>; while the library still serves the old app, keep the helper reading ConfigurationManager on net48 and an IOptions path on net10 (#if NET) |
Write a key map in migration/config-map.md: old key -> new path -> where it's set per environment.
machineKey (it encrypts ViewState and the Forms cookie). The new app doesn't read that cookie directly - remote authentication handles it (next section).builder.Services.AddDataProtection().SetApplicationName("<App>").PersistKeysToFileSystem(...) (or Redis / Blob Storage) so keys survive restarts and are shared across instances. Old cookies stop working after the switch - users sign in once again. Say this in the release notes.While both apps run - remote authentication (set up by yarp-strangler-setup):
.AddAuthenticationClient(true). Every request in the new app asks the old app who the user is (one HTTP call per request - fine for the migration period).AddNegotiate() in the new app instead and plan it with the user.Final - when the login page moves:
| Old | New |
|---|---|
Forms auth (FormsAuthentication.SetAuthCookie, a custom ticket with roles in UserData) | cookie authentication: AddAuthentication(CookieAuthenticationDefaults.AuthenticationScheme).AddCookie(o => { o.LoginPath = "/Account/Login.aspx"; o.ExpireTimeSpan = TimeSpan.FromHours(8); o.SlidingExpiration = true; }), sign in with HttpContext.SignInAsync(principal) and roles as ClaimTypes.Role claims |
Application_PostAuthenticateRequest building a GenericPrincipal | claims at sign-in (or IClaimsTransformation) |
ASP.NET Membership / SqlMembershipProvider | ASP.NET Core Identity. Passwords can't be converted - keep the old hash format behind a custom IPasswordHasher<T> that verifies the old hash and re-hashes on the next successful login |
| Custom password table (salt + hash) | keep it, verify with the same algorithm in the new login page; plan a move to Identity's hasher |
| OWIN cookie auth | shared cookie auth is possible (same cookie name, shared Data Protection keys) - otherwise remote auth |
<location path="Admin"><authorization><allow roles="Admin"/> | a policy: AddAuthorizationBuilder().AddPolicy("AdminOnly", p => p.RequireRole("Admin")) + options.Conventions.AuthorizeFolder("/Admin", "AdminOnly") (Razor Pages) or [Authorize(Policy = "AdminOnly")] |
[Authorize] API -> 302 to login | 401 for APIs: in AddCookie, set o.Events.OnRedirectToLogin to return 401 for /api paths - or keep 302 if clients depend on it (log the decision) |
Test sign-in, sign-out, expiry, "remember me", role-protected pages and API calls without a cookie - all in the parity / flow tests.
RegisterKey<T> in both apps). Pages that use session in the new app are marked .RequireSystemWebAdapterSession() / [Session].builder.Services.AddDistributedMemoryCache() (or Redis) + AddSession() + app.UseSession(); values as JSON (HttpContext.Session.SetString(key, JsonSerializer.Serialize(value))). Ask whether the data belongs in session at all (a cart often belongs in the database).Session_End has no equivalent - move its logic (usually counters) to metrics or drop it.Application["X"] -> a singleton service or IMemoryCache.Removed in .NET 9+ (it throws), and unsafe before that. Replace with System.Text.Json (or MessagePack / protobuf for binary needs). Existing serialized data (files, cache, database blobs, session state server) can't be read by the new serializer - plan it: drop it (caches), convert it once with a small net48 tool (persistent data), or read old + write new during a transition window.
| Old | New |
|---|---|
customErrors + defaultRedirect | app.UseExceptionHandler("/Error") + UseStatusCodePagesWithReExecute |
Application_Error writing a log file | ILogger + a real sink (Serilog, OpenTelemetry) |
Trace.TraceError | ILogger |
| ELMAH / log4net / NLog | their .NET 10 packages or Serilog - keep the same log destinations during the move |
appsettings.json.migration/accepted-differences.md and approved by a person.What SKILL.md sets; muted values are Claude Code's defaults
/dotnet-pack:legacy-config-auth-migratorfrom .NET Pack (legacy .NET Framework + Migration Pack to .NET 10)
npx claudepluginhub stefanthecode/ai-for-developers --plugin dotnet-pack12 skills in this plugin
/adonet-data-access-auditor(.NET) Audit and fix classic ADO.NET data-access code (SqlConnection / SqlCommand / SqlDataReader / DataSet) on .NET Framework. Use this skill whenever the user shares raw ADO.NET code, a DAL / repository built on SqlCommand, stored-proc calls, string-concatenated SQL, or mentions SQL injection, parameterized queries, connection leaks, "using / Dispose", reading the same column multiple times, transactions, or "why does my old data layer leak connections / is it safe". Always use this skill for classic ADO.NET review instead of answering from memory; it applies a fixed security + correctness + performance checklist and rewrites the code./aspnet-mvc-webapi-migrator(.NET) Migrate ASP.NET MVC 5 and Web API 2 code to ASP.NET Core on .NET 10, one controller at a time - actions, routes, filters, model binding, IHttpActionResult, child actions, OutputCache, bundling - plus the app plumbing around them - Global.asax, IHttpModule, IHttpHandler/.ashx, HttpContext.Current, Newtonsoft.Json formatters and XML content negotiation. Use this skill whenever the user wants to "migrate this controller", "Web API 2 to ASP.NET Core", "MVC 5 to .NET 10", "replace Global.asax", "convert this HTTP module to middleware", "port this .ashx handler", or is moving endpoints one by one in a strangler-fig migration. Always use this skill for MVC/Web API migrations instead of answering from memory; it keeps routes, status codes and payloads identical and proves it with parity tests./ef6-to-efcore-migrator(.NET) Move an Entity Framework 6 data layer to .NET 10 in two safe steps - first EF 6.5 on .NET 10 as a bridge (same model, same queries, no rewrite), then EF Core one DbContext at a time behind query parity tests. Covers DbModelBuilder fluent config, EDMX models, lazy loading, database initializers and Seed, DbFunctions/SqlFunctions, string Include, cascade-delete and orphan differences, and a baseline migration for an existing database. Use this skill whenever the user mentions EF6, EntityFramework 6, "EF6 to EF Core", EDMX, DbModelBuilder, "EF6 on .NET 8/10", lazy loading differences, or is moving a data layer in a .NET Framework migration. Always use this skill for EF6 migrations instead of answering from memory./legacy-package-migrator(.NET) Migrate a .NET Framework solution from packages.config to PackageReference and Central Package Management (Directory.Packages.props). Use this skill whenever the user mentions packages.config, PackageReference, "migrate packages", Directory.Packages.props, Central Package Management / CPM, transitive package versions, NuGet version drift across projects, "different projects use different versions of the same package", or wants to unify NuGet versions across a multi-project solution (including third-party/vendor extension projects). Always use this skill for these requests; it produces a staged, per-project migration plan plus the actual Directory.Packages.props and .csproj edits, not a generic explanation./migration-assessment-report(.NET) Assess a .NET Framework solution (WebForms, MVC 5, Web API 2, WCF, EF6, class libraries) for a move to .NET 10 and produce a self-contained HTML report - architecture diagrams, a blocker scan, a target per WebForms page (Razor Pages, Blazor or MVC), effort in person-days with and without AI, and a clear split of what an AI agent can do versus what needs a human. Use this skill whenever the user asks "how hard is it to move this to .NET 10", "assess this legacy solution", "give me a migration estimate", "what would it take to modernize this", "should we migrate this WebForms app", or wants a migration report for a manager or a client. Always use this skill for migration assessments instead of answering from memory; it runs a deterministic scanner, reviews the result and renders the report./migration-safety-net(.NET) Lock the current behavior of a .NET Framework app BEFORE migrating it - HTTP parity tests (record the old app's responses, then check the new .NET 10 app or the YARP host answers the same), Playwright flow tests for postback screens, and characterization (golden master) tests for business logic. Use this skill whenever the user is about to migrate or refactor legacy code and asks for "parity tests", "characterization tests", "golden master", "how do I know the new app behaves the same", "lock the behavior first", "regression tests before migration", or before any route moves from the old app to the new one. Always use this skill to build the safety net instead of writing ad-hoc tests; it produces a reusable record/verify harness and an accepted-differences log.Other plugins' skills for the same job