【发布时间】:2016-09-18 16:52:37
【问题描述】:
我正在尝试将现有的类库代码转换为 .NET Core 类库。在 static 构造函数的代码中,我有以下内容:
ServicePointManager.DefaultConnectionLimit = 100;
ServicePointManager.Expect100Continue = false;
我做了一些搜索,ServicePointManager 在 .NET Core 中不再可用,现在应该使用WinHttpHandler (ServicePointManager.DefaultConnectionLimit in .net core?)。
我的问题是 ServicePointManager 到底是什么,正在设置的属性是什么?
WinHttpHandler 不是 static 和 ServicePointManager 一样,所以我必须创建一个实例来设置这些属性?我是否需要更改所有 http 调用才能使用该实例?
【问题讨论】:
-
你能移植 pushsharp 吗?我正在做这件事,并假设这就是你正在做的事情。
标签: c# asp.net-core .net-core asp.net-core-1.0