为什么 .Net Core 不支持 HttpServerUtility 类

问题描述 投票:0回答:1

https://learn.microsoft.com/en-us/dotnet/api/system.web.httpserverutility?view=netframework-4.8 正如前面的链接中提到的,HttpServerUtility 类仅在 .NetFramework 中受支持。

System.Web 命名空间包含 HttpServerUtility,但 dotnet core 中支持 System.Web,为什么 HttpServerUtility 不支持?

asp.net asp.net-mvc asp.net-core asp.net-mvc-4 asp.net-web-api
1个回答
2
投票

对于 .NET Core 和 .NET 5+ 必须使用 HttpUtility 类 而不是 HttpServerUtility 类

© www.soinside.com 2019 - 2024. All rights reserved.