2017-08-28 22:14:58 +08:00
---
2023-03-08 08:11:54 +08:00
title: Update from ASP.NET to ASP.NET Core
2021-12-10 09:19:23 +08:00
author: isaacrlevin
2023-02-02 02:56:48 +08:00
description: Guidance for migrating existing ASP.NET MVC or Web API apps to ASP.NET Core.web
2022-09-12 04:46:50 +08:00
ms.author: riande
2019-10-19 03:25:17 +08:00
ms.date: 10/18/2019
2017-08-29 00:12:40 +08:00
uid: migration/proper-to-2x/index
2017-08-28 22:14:58 +08:00
---
2023-03-08 08:11:54 +08:00
# Upgrade from ASP.NET Framework to ASP.NET Core
2017-08-28 22:14:58 +08:00
2023-01-25 06:22:30 +08:00
:::moniker range=">= aspnetcore-7.0"
2023-03-08 08:11:54 +08:00
## Why upgrade to the latest .NET
ASP.NET Core is the modern web framework for .NET. While ASP.NET Core has many similarities to ASP.NET in the .NET Framework, it's a new framework that's completely rewritten. ASP.NET apps updated to ASP.NET Core can benefit from improved performance and access to the latest web development features and capabilities.
## ASP.NET Framework update approaches
2023-01-25 06:22:30 +08:00
2023-03-08 08:11:54 +08:00
Most non-trivial ASP.NET Framework apps should consider using the [incremental upgrade ](/aspnet/core/migration/inc/overview ) approach. For more information, see [Incremental ASP.NET to ASP.NET Core upgrade ](/aspnet/core/migration/inc/overview ).
2022-09-12 04:46:50 +08:00
2023-03-17 02:52:26 +08:00
For ASP.NET MVC and Web API apps, see < xref:migration / mvc > . For ASP.NET Framework Web Forms apps, see < xref:migration / web_forms > .
2022-05-29 03:14:10 +08:00
2023-04-13 09:29:10 +08:00
[!INCLUDE[ ](~/includes/reliableWAP_H2.md )]
2023-02-02 02:56:48 +08:00
## URI decoding differences between ASP.NET to ASP.NET Core
2017-08-28 22:14:58 +08:00
2023-02-02 02:56:48 +08:00
ASP.NET Core has the following URI decoding differences with ASP.NET Framework:
2017-08-28 22:14:58 +08:00
2023-02-02 02:56:48 +08:00
| ASCII | Encoded | ASP.NET Core | ASP.NET Framework |
| ------------- | ------------- | ------------- | ------------- |
| `\` | `%5C` | `\` | `/` |
| `/` | `%2F` | `%2F` | `/` |
2017-08-28 22:14:58 +08:00
2023-02-02 02:56:48 +08:00
When decoding `%2F` on ASP.NET Core:
2018-05-04 23:29:28 +08:00
2023-02-02 02:56:48 +08:00
* The entire path gets unescaped except `%2F` because converting it to `/` would change the path structure. It can’ t be decoded until the path is split into segments.
2017-08-28 22:14:58 +08:00
2023-02-02 02:56:48 +08:00
To generate the value for `HttpRequest.Url` , use `new Uri(this.AspNetCoreHttpRequest.GetEncodedUrl());` to avoid `Uri` misinterpreting the values.
2017-08-28 22:14:58 +08:00
2023-02-02 02:56:48 +08:00
## Migrating User Secrets from ASP.NET Framework to ASP.NET Core
2017-08-28 22:14:58 +08:00
2023-02-02 02:56:48 +08:00
See [this GitHub issue ](https://github.com/dotnet/AspNetCore.Docs/issues/27611 ).
2020-08-20 09:42:42 +08:00
2023-03-08 08:11:54 +08:00
<!-- remove these comments when the following overview topic is updated
2018-01-28 04:21:42 +08:00
## Additional resources
2023-02-02 02:56:48 +08:00
- [Overview of porting from .NET Framework to .NET ](/dotnet/core/porting/libraries )
2023-03-08 08:11:54 +08:00
-->
2023-01-25 06:22:30 +08:00
:::moniker-end
2023-03-17 02:52:26 +08:00
[!INCLUDE[ ](~/migration/proper-to-2x/includes/index5.md )]