小编Abh*_*hra的帖子

“ServicePointManager.FindServicePoint(Uri)”已过时:改用 HttpClient

更新 C# 从 NET 5 升级到 6 后开始出现此错误 -

警告 SYSLIB0014“ServicePointManager.FindServicePoint(Uri)”已过时:“WebRequest、HttpWebRequest、ServicePoint 和 WebClient 已过时。请改用 HttpClient。

var servicePoint = ServicePointManager.FindServicePoint(requestUri.GetEndpoint());
            if (servicePoint.ConnectionLeaseTimeout == -1){}
Run Code Online (Sandbox Code Playgroud)

httpclient servicepointmanager c#-6.0

5
推荐指数
1
解决办法
1644
查看次数

标签 统计

c#-6.0 ×1

httpclient ×1

servicepointmanager ×1