migrating-mvc-authentication

Migrate ASP.NET MVC authentication and authorization configurations to ASP.NET Core.

19|2|Updated May 13, 2026
One-click install
npx skills add https://github.com/microsoft/upgrade-agent-plugins --skill migrating-mvc-authentication
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: migrating-mvc-authentication
Source: https://github.com/microsoft/upgrade-agent-plugins/tree/main/plugins/upgrade-agent/extenders/upgrade-dotnet/upgrade/skills/lazy/web/mvc/migrating-mvc-authentication
Command: npx skills add https://github.com/microsoft/upgrade-agent-plugins --skill migrating-mvc-authentication

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires Microsoft.AspNetCore.Authentication, Microsoft.AspNetCore.Authorization, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill addresses the challenge of migrating authentication and authorization from ASP.NET MVC to ASP.NET Core, ensuring a smooth transition with security and functionality intact.

Core Features & Use Cases

  • Authentication Mechanism Migration: Handles various authentication mechanisms like Forms Authentication, Membership providers, Windows Authentication, and token-based auth.
  • Authorization Rule Migrations: Transfers authorization rules from web.config to policy-based authorization in ASP.NET Core.
  • Anti-Forgery Token Management: Converts anti-forgery tokens for compatibility with ASP.NET Core.
  • Use Case: Ideal for developers looking to upgrade legacy ASP.NET MVC applications to ASP.NET Core while maintaining user authentication and authorization.

Quick Start

Migrate your project's authentication to ASP.NET Core using the migrating-mvc-authentication skill.

Frequently Asked Questions about migrating-mvc-authentication

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

FAQPage Schema
How do I migrate ASP.NET MVC authentication to ASP.NET Core?

To migrate ASP.NET MVC authentication to ASP.NET Core, transition your authentication configurations using middleware that handles Forms Authentication, Membership providers, and Windows Authentication, ensuring a secure upgrade.

How does ASP.NET Core handle authorization rules migrated from web.config?

ASP.NET Core handles authorization rules migrated from web.config by converting them into policy-based authorization configurations. This approach replaces legacy XML-based rules with flexible, code-defined security policies.

Do I need .NET Core middleware to migrate ASP.NET MVC authentication?

Yes, you need .NET Core and applicable authentication middleware to migrate ASP.NET MVC authentication. The middleware provides the necessary pipeline to process token-based auth and manage anti-forgery tokens correctly.

What is the best way to convert anti-forgery tokens for ASP.NET Core?

The best way to convert anti-forgery tokens for ASP.NET Core is to use a migration process that manages token compatibility directly within the authentication middleware. This preserves request verification functionality.

Can I migrate token-based authentication from ASP.NET MVC to ASP.NET Core?

Yes, you can migrate token-based authentication from ASP.NET MVC to ASP.NET Core. The migration handles various authentication mechanisms, ensuring tokens are correctly processed by the new middleware pipeline.

Why does migrating ASP.NET MVC authorization require policy-based authorization?

Migrating ASP.NET MVC authorization requires policy-based authorization because ASP.NET Core replaces legacy web.config rules with policy-based authorization. This shift provides a more robust, code-driven security model.