migrating-mvc-httpcontext

Migrate ASP.NET MVC HttpContext code to ASP.NET Core equivalents.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill addresses the challenge of migrating ASP.NET MVC applications to ASP.NET Core by automatically replacing and updating HttpContext-related code patterns.

Core Features & Use Cases

  • Automatic Code Replacement: Identifies and replaces HttpContext.Current usage with equivalent ASP.NET Core code.
  • Request and Response Handling: Migrates request and response patterns to align with ASP.NET Core standards.
  • HttpServerUtility Calls: Replaces HttpServerUtility calls with their ASP.NET Core equivalents.
  • ClaimsPrincipal Migration: Updates usage of ClaimsPrincipal.Current to work with ASP.NET Core's asynchronous pipeline.
  • Use Case: For instance, if you have an existing ASP.NET MVC application that relies heavily on HttpContext.Current, this Skill can automate the migration process, significantly reducing manual work.

Quick Start

Run the Skill to begin the automated migration of HttpContext-related code in your ASP.NET MVC project.

Frequently Asked Questions about migrating-mvc-httpcontext

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

FAQPage Schema
How do I migrate HttpContext.Current from ASP.NET MVC to ASP.NET Core?

To migrate HttpContext.Current from ASP.NET MVC to ASP.NET Core, this Skill automatically identifies the legacy usages and replaces them with equivalent ASP.NET Core code patterns that access context through the new asynchronous pipeline.

What is the best way to handle HttpServerUtility calls when migrating to ASP.NET Core?

The best way to handle HttpServerUtility calls during ASP.NET Core migration is using this Skill to automatically replace them with their direct ASP.NET Core equivalents, ensuring server utility functions align with Core standards.

Does ASP.NET Core still support ClaimsPrincipal.Current for MVC migrations?

ASP.NET Core does not support ClaimsPrincipal.Current the same way; this Skill updates those usages to function correctly within ASP.NET Core's asynchronous pipeline during migration.

Can I automate request and response code replacement when moving an MVC app to ASP.NET Core?

Yes, you can automate request and response code replacement when moving an MVC app to ASP.NET Core using this Skill, which handles HttpRequest and HttpResponse patterns to align with Core standards.

What do I need to know before migrating HttpContext usage to ASP.NET Core?

Before migrating HttpContext usage to ASP.NET Core, you need knowledge of both MVC and Core frameworks to properly handle context access, request and response processing, and server utility migration.